Scott David Daniels <[EMAIL PROTECTED]> writes on Wed, 29 Jun 2005 10:36:29 
-0700:
> Peter Tillotson wrote:
> ...
> > from myZip.zip import myModule.py
> 
> 
> Does this work for you?  It gives me a syntax error.
> 
> Typically, put the zip file on the sys.path list, and import modules
> and packages inside it.  If you zip up the above structure, you can use:
> 
>      sys.path.insert(0, 'myZip.zip')
>      import base.branch1.myModule

The alternative is to use a "zipimporter" (from module "zipimport")
and use the "importer protocol" (documented in a PEP).
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to