Brett Cannon wrote:
On Fri, Jun 20, 2008 at 10:16 PM, Neil Schemenauer <[EMAIL PROTECTED]> wrote:
I wonder if it would make sense to start installing the Python
standard library as a .zip file by default. Some benefits would be
a tidier and more compact install and slightly faster startup times.
One downside is that it becomes more difficult to look at the source
of modules. That's an important feature of Python, especially for
people learning the language.
I think that downside could be mitigated by adding an option to
pydoc that shows the source of a module. For example, "pydoc -s
bisect" could show the source for the bisect module.
Or zipimport grows the ability to store source and supplies the
get_source() method as specified in PEP 302. Then pydoc can just use
the loader to get at the source.
It already provides that (it goes and gets it out of the zipfile when
requested). [1]
I believe the only new part that Neil is suggesting is the "-s <mod>"
option to get pydoc to import the module and return its source code (if
available).
So "pydoc -s <mod>" would work for an installed python and "./python -m
pydoc -s <mod>" for an uninstalled one.
Cheers,
Nick.
[1] http://docs.python.org/lib/zipimporter-objects.html
--
Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com