would be nice: import from archive

Just just at xs4all.nl
Mon Aug 30 09:03:58 EDT 2004


In article <m3ekloont2.fsf at g2ctech.com>, Jorge Godoy <godoy at ieee.org> 
wrote:

> > How does that follow? The zip archive _itself_ is the "directory" where 
> > the .py files are, why would Python suddenly choose to write .pyc files 
> > one level up? And what about packages? It simply doesn't work that way.
> 
> Because the implementation that allowed to unzip the "directory" and
> find the files in there would also allow to place the '.pyc' in a
> different place such as the real directory where the zip file resides.
> 
> Python didn't use to open zip files also, and now it does.  I don't see
> nothing wrong with making it also writing the '.pyc' files.  Do you? 

Yes, because it's conceptually inconsistent with how "regular" imports 
work.

Just



More information about the Python-list mailing list