Py2exe embed my modules to libary.zip

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed Mar 26 14:19:03 EDT 2008


En Wed, 26 Mar 2008 14:55:43 -0300, <vedrandekovic at gmail.com> escribió:

> Does anybody have any idea how can I embed my modules to libary.zip
> and use it from my application.For example if user write this code in
> my TextEntry ( or something like that, textentry is created with
> wxpython ) :
>
> import d3dx  # directpython module
> frame=d3dx.Frame(u"My frame")  # create frame
> frame.Mainloop()   # run it
>
> ....and then when my application execute code how can I set path to
> d3dx module to "library.zip/d3dx.py".
> I'm not sure is this properly set question.

If d3dx.py is in library.zip (top level), and the path to library.zip is  
in sys.path, Python will find the module.
A .zip in sys.path acts as it were a directory itself.

-- 
Gabriel Genellina




More information about the Python-list mailing list