cpython: b92fa1c5a96b (original) (raw)
Mercurial > cpython
changeset 77455:b92fa1c5a96b
Closes issue #14982: Document that pkgutil's walk_packages() and iter_modules() requires iter_modules() be defined on an importer. The importers in importlib do not define this non-standard method. [#14982]
Brett Cannon brett@python.org | |
---|---|
date | Fri, 15 Jun 2012 19:21:07 -0400 |
parents | 7b8d3b7fd606 |
children | 034c814eb187 |
files | Doc/library/pkgutil.rst Misc/NEWS |
diffstat | 2 files changed, 12 insertions(+), 0 deletions(-)[+] [-] Doc/library/pkgutil.rst 8 Misc/NEWS 4 |
line wrap: on
line diff
--- a/Doc/library/pkgutil.rst +++ b/Doc/library/pkgutil.rst @@ -138,6 +138,10 @@ support. prefix is a string to output on the front of every module name on output.
- .. note::
Only works for importers which define a ``iter_modules()`` method, which[](#l1.8)
is non-standard but implemented by classes defined in this module.[](#l1.9)
+ .. function:: walk_packages(path=None, prefix='', onerror=None) @@ -166,6 +170,10 @@ support. # list all submodules of ctypes walk_packages(ctypes.path, ctypes.name + '.')
- .. note::
Only works for importers which define a ``iter_modules()`` method, which[](#l1.19)
is non-standard but implemented by classes defined in this module.[](#l1.20)
+ .. function:: get_data(package, resource)
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -24,6 +24,10 @@ Core and Builtins Library ------- +- Issue #14982: Document that pkgutil's iteration functions require the