Embedding Python in C++
-
Good Morning Sir, I referred this tutorial, Embedding Python program in a C/C++ code[^] I have followed up the tutorial and successfully embedded Python in my code.
PyRun_SimpleString("print('Hello World from Embedded Python!!!')");
is used to execute a single line of Python code but how do I run a multiple lines of code in Python. I also tried running a Python from a file but the file also needed to be there for running the executable. :(( I dont want a file along with my executable, I searched in the google sir but I find no results. I am confused here, I dont know what to do:confused: Thank you sir for your time
-
Good Morning Sir, I referred this tutorial, Embedding Python program in a C/C++ code[^] I have followed up the tutorial and successfully embedded Python in my code.
PyRun_SimpleString("print('Hello World from Embedded Python!!!')");
is used to execute a single line of Python code but how do I run a multiple lines of code in Python. I also tried running a Python from a file but the file also needed to be there for running the executable. :(( I dont want a file along with my executable, I searched in the google sir but I find no results. I am confused here, I dont know what to do:confused: Thank you sir for your time
Ask this question right under that post and author will tell you how. There is a forum provided for questions about methodology of the article, or similar aspects etc. That is, so that if someone else happens to have a similar problem, they can know how to solve this.
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
-
Ask this question right under that post and author will tell you how. There is a forum provided for questions about methodology of the article, or similar aspects etc. That is, so that if someone else happens to have a similar problem, they can know how to solve this.
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~