-7

I need to make a Python embedded C++ program that can open programs, like Skype and Firefox. It will have to be compiled into an executable, or have a batch file run it. (It is for Windows 7 x64 bit).

I know there are tutorials out there, but none of them give any insight into how to do OS operations. Please no boost libraries if at all possible, the documentation for those is really confusing to me.

If there are any examples, tutorials, templates, or anything else besides the boost libraries that would be a huge. Python 3 or Python 2.7 is good, it doesn't matter either way.

Or if anyone has any tips, or any help at all would be much appreciated.

Edit::

Sometimes I don't even know why I bother asking for help on this site when this is the quality of responses I get to a question like this.

4

1 回答 1

3

首先,如果你打算将 python 嵌入到 C++ 程序中只是因为你想启动其他程序,那么你就是在用大锤打苍蝇。

使用 Python 中的subprocessos模块使用核心 python 本身执行您的任务。

但是,如果您的嵌入式 python 模块是使用 C++ 开发的更大应用程序的一部分,那么请参阅扩展和嵌入 Python 解释器以获取更多信息,哦,现在开始执行此任务。

于 2013-08-04T06:32:33.103 回答