[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: embedded python in c++ packaging

Gabriel Genellina

2/8/2008 2:49:00 AM

En Thu, 07 Feb 2008 21:05:46 -0200, Furkan Kuru <furkankuru@gmail.com>
escribió:

> I do not have access to my development machine right now.
> but is it enough adding just a simple line at the top of my main python
> file
> 'sys.path.append("modules.zip")' before importing any other modules?

Almost. Some imports (site, warnings, os...) are done when Py_Initialize
is executed, before there is a chance of modifying sys.path. You'll have
to modify the environment (PYTHONPATH var) or look at how py2exe does
that. Or use the name pythonXX.zip, which is already in sys.path (see PEP
273 http://www.python.org/dev/peps... )

--
Gabriel Genellina