How can I integrate python in my C++ application
-
Lets take example of software that uses python as one of library which is built in C++
The software needs to hear what user is saying
So I can use any library of python to do that
CMU Sphinx
Snowboy Hotword Detection
Google Speech Recognition.How can I use these both things together (PYTHON AND C++)
https://docs.python.org/2/extending/embedding.html#embedding-python-in-c
Here is link from python but I want to solve my problemIf Possible Provide same thing with javascript tooooooo
Thank You
-
Hi
Maybe this can help ?
https://www.codeproject.com/Articles/820116/Embedding-Python-program-in-a-C-Cplusplus-code -
Hi,
From the looks of it, they can be all used through C++. Why do you need Python ?
-
The link that you posted basically already describes how to embed python (however it is for python 2 which is no longer supported, but the same thing can be done with python3 see here.
However the reason why someone would embed python in c++ typically is, that you have a compiled application and want the user to be able to make some scripting in python to extend the functionality, write own plugins and stuff like that.
If you just want to use some libs then I'm almost sure that it does not make a lot of sense to use the python libs while programming in c++. Either write everything in python or search for c++-libs that provide the functions you need.
Or what exactly is the reason that you want to go with this mixed approach?