问题描述
早上好,先生,
我已经推荐过这篇文章, []我已经跟进了教程并在我的代码中成功嵌入了Python。
Good Morning Sir,
I have referred this article, 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!!!')");
s用于执行单行Python代码但是如何运行Python中的多行代码。我也试过从文件中运行Python,但是文件也需要在那里运行可执行文件。哭| :((我不想要一个文件和我的可执行文件,我搜索谷歌先生,但我发现没有结果。
我在这里很困惑,我不知道是什么to doConfused |:confused:
谢谢先生您的时间
我有什么试过:
1.试图联系文章的作者,等待 月 他反应迟钝。
2.尝试了一些谷歌搜索,但我找不到任何相关内容,我仍在等待作者回复。
非常感谢任何帮助
谢谢你的时间先生!
s 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. Cry | :(( 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 doConfused | :confused:
Thank you sir for your time
What I have tried:
1. tried to contact the author of the article, waited for a month and he is unresponsive.
2. Tried some Googling but I don't find anything relevant, and I am still waiting for the author to respond.
Any help is much appreciated
Thank you sir for your time!
推荐答案
这篇关于在C ++中嵌入Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!