embedded python pythonpath

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed Mar 26 02:49:36 CET 2008

En Tue, 25 Mar 2008 22:22:41 -0300, Furkan Kuru <furkankuru at gmail.com>  

> On 3/26/08, Gabriel Genellina <gagsl-py2 at yahoo.com.ar> wrote:
>> En Tue, 25 Mar 2008 20:38:39 -0300, Furkan Kuru <furkankuru at gmail.com>
>> escribió:
>> > Actually, I do not want any .py or .pyc files around my executable.
>> > (including userdict, sys, site etc)
>> > I want to have just single zip file for all python files.
>> Putting all of them into pythonNN.zip (NN depending on the Python  
>> version
>> in use) should be enough, but I've never tried it.
>  I had already tried putting all of them into pythonNN.zip but I had to  
> copy it to the place
> where sys.path points in my case it was windows\system32\python25.zip

It should be in the same directory as python25.dll; you don't have to use  
windows\system32 if you copy python25.dll to your application directory.

>> After renaming the directory where Python 2.5 were installed, my
>> test25.exe program (the one compiled using Python 2.5.1) worked fine. So
>> it looks like it is something with how the "python home" is searched.
> Ok then changing or deleting pythonhome environment variable may fix the
> problem?

"Python home" means the directory where Python is installed, from which  
the rest of the directories are derived. It should have a lib directory  
with an os.py file inside, and so on...
I don't have a PYTHONHOME environment variable, nor a PYTHONPATH (except  
for this testing).

Gabriel Genellina

More information about the Python-list mailing list