[Distutils] Minor bug in PythonEggs setuptools-0.6b3 and earlier)?!

Phillip J. Eby pje at telecommunity.com
Wed Jun 14 16:42:52 CEST 2006


At 12:11 PM 6/14/2006 +0200, Jens Engel wrote:

>Hello,
>
>PythonEggs seem to have a problem access the docstring of the root package.
>Note that there is no problem accessing docstrings of contained modules 
>and packages with Python's help().

The pydoc module (which implements the help() function) doesn't support zip 
files when listing the contents of a package.  (That is, it's not the 
docstring that there's a problem with, it's help() trying to list the 
modules from the package.)

This is a Python bug that is fixed in Python 2.5.  I plan to release a 
hotfix package for older versions of Python that fixes the bug.

In the meantime, you can work around it by using the --always-unzip option 
when easy_install-ing a package; the package will then be installed as a 
directory instead of a zipfile.  But be sure you need it, because egg 
directories slow down startup and importing much more than zipfiles do.

Alternatively, you can just grab the Python 2.5 version of the pydoc and 
pkgutil modules and drop them on your PYTHONPATH ahead of the standard 
library versions.  (The 2.5 version of pydoc uses utilities in pkgutil to 
access packages' module lists.)



More information about the Distutils-SIG mailing list