Python 2.6.1 @executable_path

Michael Torrie torriem at gmail.com
Sun Jan 11 06:49:57 CET 2009


googler.1.webmaster at spamgourmet.com wrote:
> Thanks for the link but I don't want to do a make a python script as
> an applicatin, I want to embedd python into a C++ app so thats the
> reason why I have to compile Python.

If you are embedding python, then all you have to do is stick the python
 modules you need in somewhere in the resources folder, along with the
dynamic link library that you built.  Then you fix up your executable to
be able to find the dynamic link library (been a while since I made app
bundles in general... followed the Qt docs if I recall).  When your app
goes to initialize python, just use python api calls to set the python
path that it will use to find the import modules.  You should be able to
programmatically determine this (see apple docs I guess).

In short, you can do it all with the python C api, programmatically in
your exe, once you've taken care of the initial link against the python
dynlib.




More information about the Python-list mailing list