[Python-Dev] __file__

Baptiste Carvello baptiste13z at free.fr
Mon Mar 1 08:25:08 CET 2010

Brett Cannon a écrit :
>     However, making a difference between zipimport and the filesystem
>     importer means the application will stop working if I unzip the
>     library zip file, which is surprising. Unzipping the zip file can be
>     handy when debugging a bug caused by a forgotten module.
> Is it really that hard to unzip a bunch of .pyc files, modify what you 
> need to, and then zip it back up? And if you are given a zip file of 
> only .pyc files you can't really debug anything anyway.

Well, this is a micro-use-case, I admit, I only mention it because it's 
something I've really done. It's only useful for debugging the building process, 
not the application (so I do have the source at hand), and the only reason for 
not rezipping is to test more quickly. I can definitely live without it!

Cheers, Baptiste

More information about the Python-Dev mailing list