At 04:57 PM 4/26/2006 -0700, Guido van Rossum wrote:
>On 4/26/06, Delaney, Timothy (Tim) <[EMAIL PROTECTED]> wrote:
> > Possibly. Perhaps it would be useful to have `is_package(dirname)`,
> > `is_rootpackage(dirname)` and `is_subpackage(dirname)` functions
> > somewhere (pkgutils?).
>
>YAGNI. Also note that not all modules or packages are represented by
>pathnames -- they could live in zip files, or be accessed via whatever
>other magic an import handler users.

FYI, pkgutil in 2.5 has utilities to walk a package tree, starting from 
sys.path or a package __path__, and it's PEP 302 compliant.  pydoc now uses 
this in place of directory inspection, so that documenting zipped packages 
works correctly.

These functions aren't documented yet, though, and probably won't be until 
next week at the earliest.

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to