[Python-3000] stdlib as .zip by default, pydoc to view source?

Nick Coghlan ncoghlan at gmail.com
Sun Jun 22 03:49:44 CEST 2008


Guido van Rossum wrote:
> On Sat, Jun 21, 2008 at 12:20 PM, Terry Reedy <tjreedy at udel.edu> wrote:
>> For startup and import speed (and self-contained distributions),
>> do not we only need a zip of the .pyc files?
>> Not having those around would make browsing the .py files easier.
>> Could tracebacks be make to still work then?
> 
> It's kind of tricky to have the .pyc files in a different place than
> the .py files. The module search code isn't really geared towards that
> ATM.

I'll second that "kind of tricky" comment.

Setting the basics up isn't that hard (we'd simply have to have the 
zipfile of .pyc files ahead of the directory of source files on 
sys.path), but doing so has the consequence that editing the source 
files no longer has any effect. The import machinery will find the pyc 
files first, and then stop looking.

If people are genuinely interested in this kind of thing, I suggest they 
talk to Brett about helping out with his import_in_py branch for 
2.7/3.1. Many things should become possible once we no longer need to 
babysit the code in import.c :)

Cheers,
Nick.


-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org


More information about the Python-3000 mailing list