would be nice: import from archive

Jorge Godoy godoy at ieee.org
Mon Aug 30 13:41:45 CEST 2004


Just <just at xs4all.nl> writes:

> In article <m3oektzkj2.fsf at g2ctech.com>, Jorge Godoy <godoy at ieee.org> 
> wrote:
>
>> Just <just at xs4all.nl> writes:
>> 
>> > But since .pyc's are always generated in the same directory as the .py 
>> > files, where else would you expect them to be generated?
>> 
>> At the directory where the zip archive is stored.
>
> 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? 

-- 
Godoy.     <godoy at ieee.org>



More information about the Python-list mailing list