summaryrefslogtreecommitdiff
path: root/Doc/library/zipimport.rst
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-04-25 01:59:09 +0000
committerBenjamin Peterson <benjamin@python.org>2008-04-25 01:59:09 +0000
commit1d3227e5f9f7acf2275f31ba44dffaf60262b824 (patch)
tree83462006efe4ed692d231a1a48dc7e6068fcf594 /Doc/library/zipimport.rst
parentb908467e23de983449e97fc6d253b277101d01ef (diff)
downloadcpython-1d3227e5f9f7acf2275f31ba44dffaf60262b824.tar.gz
Merged revisions 62490 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r62490 | benjamin.peterson | 2008-04-24 20:29:10 -0500 (Thu, 24 Apr 2008) | 2 lines reformat some documentation of classes so methods and attributes are under the class directive ........
Diffstat (limited to 'Doc/library/zipimport.rst')
-rw-r--r--Doc/library/zipimport.rst56
1 files changed, 29 insertions, 27 deletions
diff --git a/Doc/library/zipimport.rst b/Doc/library/zipimport.rst
index f8d0b1d18b..8972c06764 100644
--- a/Doc/library/zipimport.rst
+++ b/Doc/library/zipimport.rst
@@ -70,55 +70,57 @@ zipimporter Objects
(provided that it exists).
-.. method:: zipimporter.find_module(fullname[, path])
+ .. method:: find_module(fullname[, path])
- Search for a module specified by *fullname*. *fullname* must be the fully
- qualified (dotted) module name. It returns the zipimporter instance itself if
- the module was found, or :const:`None` if it wasn't. The optional *path*
- argument is ignored---it's there for compatibility with the importer protocol.
+ Search for a module specified by *fullname*. *fullname* must be the fully
+ qualified (dotted) module name. It returns the zipimporter instance itself
+ if the module was found, or :const:`None` if it wasn't. The optional
+ *path* argument is ignored---it's there for compatibility with the
+ importer protocol.
-.. method:: zipimporter.get_code(fullname)
+ .. method:: get_code(fullname)
- Return the code object for the specified module. Raise :exc:`ZipImportError` if
- the module couldn't be found.
+ Return the code object for the specified module. Raise
+ :exc:`ZipImportError` if the module couldn't be found.
-.. method:: zipimporter.get_data(pathname)
+ .. method:: get_data(pathname)
- Return the data associated with *pathname*. Raise :exc:`IOError` if the file
- wasn't found.
+ Return the data associated with *pathname*. Raise :exc:`IOError` if the
+ file wasn't found.
-.. method:: zipimporter.get_source(fullname)
+ .. method:: get_source(fullname)
- Return the source code for the specified module. Raise :exc:`ZipImportError` if
- the module couldn't be found, return :const:`None` if the archive does contain
- the module, but has no source for it.
+ Return the source code for the specified module. Raise
+ :exc:`ZipImportError` if the module couldn't be found, return
+ :const:`None` if the archive does contain the module, but has no source
+ for it.
-.. method:: zipimporter.is_package(fullname)
+ .. method:: is_package(fullname)
- Return True if the module specified by *fullname* is a package. Raise
- :exc:`ZipImportError` if the module couldn't be found.
+ Return True if the module specified by *fullname* is a package. Raise
+ :exc:`ZipImportError` if the module couldn't be found.
-.. method:: zipimporter.load_module(fullname)
+ .. method:: load_module(fullname)
- Load the module specified by *fullname*. *fullname* must be the fully qualified
- (dotted) module name. It returns the imported module, or raises
- :exc:`ZipImportError` if it wasn't found.
+ Load the module specified by *fullname*. *fullname* must be the fully
+ qualified (dotted) module name. It returns the imported module, or raises
+ :exc:`ZipImportError` if it wasn't found.
-.. attribute:: zipimporter.archive
+ .. attribute:: archive
- The file name of the importer's associated ZIP file.
+ The file name of the importer's associated ZIP file.
-.. attribute:: zipimporter.prefix
+ .. attribute:: prefix
- The path within the ZIP file where modules are searched; see
- :class:`zipimporter` for details.
+ The path within the ZIP file where modules are searched; see
+ :class:`zipimporter` for details.
.. _zipimport-examples: