embedded python pythonpath

Furkan Kuru furkankuru at gmail.com
Tue Mar 25 21:22:41 EDT 2008


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


> I had a look at py2exe source codes but could not figure out how it just
> > looks into a zip file.
>
> Standard Python already supports having zip files in sys.path (using the
> builtin zipimport module), you don't have to do anything special to enable
> that (apart from building with the required dependencies, like zlib, of
> course)



yes I know but I do not want "any" py or pyc file. I would still need
dict.pyc, sys.pyc, site.pyc etc. files for py_initialize.

> So maybe I have to compile the svn version of python.
>
> 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?

thanks,

Anyway, as I said earlier, you don't have to play with PYTHONPATH; just
> add any required directory to sys.path at runtime.
>
> --
> Gabriel Genellina
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Furkan Kuru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080326/4c88da80/attachment.html>


More information about the Python-list mailing list