将python脚本添加到c ++项目 [英] Adding python script to c++ project
问题描述
我如何将一个用python编写的脚本添加到c ++项目?感谢
编辑:基本上所有的脚本都是电子邮件一些数据。我想传递数据,也许电子邮件地址到python写的函数。希望清除东西..
您可能对 Boost.Python:嵌入解释器或 Python / C API:嵌入Python解释器。您可以直接使用Python C API,也可以使用Boost.Python库。您可能还有兴趣阅读将Python嵌入您的C程序,您可以通过它了解详情。 p>
How would I go about adding a script written in python to a c++ project? Thanks
Edit: Basically all the script does is email some data. I would like to pass the data and maybe the email address to a function written in python. Hope that clears things up..
You may be interested in Boost.Python: Embedding the Interpreter, or Python/C API: Embedding the Python Interpreter. You can either use the Python C APIs directly or use the Boost.Python library as you so choose. You might also be interested in reading Embedding Python in Your C Programs which walks you through it.
这篇关于将python脚本添加到c ++项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!