开发者

How does py2exe actually -and simply explained- work? :)

I have a c++ app that calls another python one (bundled into开发者_JS百科 an exe with py2exe) So I have 2 apps.

So I was wondering: What if my c++ did what py2exe does? i.e. embed the python app in the c++ one. This way I won't depend on py2exe and its configurations nighmares (yes, it has some)

Hence my questions:

  • how does py2exe work (so I can do its job with my c++ app)
  • What about just embedding the whole python app with the c++? I read the python doc about embedding, did an example (a very simple one that does PyRun_SimpleString) but what about a whole python app with tons of modules? (zipimport maybe?)

I'd love to hear how you'd do that.

Thanks a lot! :)


http://www.py2exe.org/index.cgi/FAQ

Basically, it packages up your python install and redistributes it. It still runs your Python as Python on a Python interpreter. The exe it creates just kicks everything off.

The Python website has some methods on integrating with C++.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜