[Python-Dev] __file__

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


Antoine Pitrou a écrit :
> Le Sun, 28 Feb 2010 21:45:56 +0100, Baptiste Carvello a écrit :
>> bytecode-only in a zip is used by py2exe, cx_freeze and the like, for
>> space reasons. Disabling it would probably hurt them.
> 
> Source code compresses quite well. I'm not sure it would make much of a 
> difference. 

I did a quick check on the stdlib: a zip with .py and .pyc is about 80% bigger 
than one with .pyc only. If you use only the bytecode, this can be seen as 
waisted space. On the other hand, if you ever need to debug the application, 
source is very handy...

Anyway, I'm a bit worried if bytecode-only is disabled from zipimport without 
some input from the developpers of py2exe/cx_freeze/etc, as they are big users 
of it.

Cheers, Baptiste



More information about the Python-Dev mailing list