Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b387ad6e
Commit
b387ad6e
authored
Dec 12, 2010
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove reference to stuff which is already obsolete in 2.x.
parent
c58bde15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
82 deletions
+0
-82
Doc/library/imp.rst
Doc/library/imp.rst
+0
-82
No files found.
Doc/library/imp.rst
View file @
b387ad6e
...
...
@@ -258,88 +258,6 @@ to indicate the search result of :func:`find_module`.
The module was found as a frozen module (see :func:`init_frozen`).
The following constant and functions are obsolete; their functionality is
available through :func:`find_module` or :func:`load_module`. They are kept
around for backward compatibility:
.. data:: SEARCH_ERROR
Unused.
.. function:: init_builtin(name)
Initialize the built-in module called *name* and return its module object along
with storing it in ``sys.modules``. If the module was already initialized, it
will be initialized *again*. Re-initialization involves the copying of the
built-in module's ``__dict__`` from the cached module over the module's entry in
``sys.modules``. If there is no built-in module called *name*, ``None`` is
returned.
.. function:: init_frozen(name)
Initialize the frozen module called *name* and return its module object. If
the module was already initialized, it will be initialized *again*. If there
is no frozen module called *name*, ``None`` is returned. (Frozen modules are
modules written in Python whose compiled byte-code object is incorporated
into a custom-built Python interpreter by Python's :program:`freeze`
utility. See :file:`Tools/freeze/` for now.)
.. function:: is_builtin(name)
Return ``1`` if there is a built-in module called *name* which can be
initialized again. Return ``-1`` if there is a built-in module called *name*
which cannot be initialized again (see :func:`init_builtin`). Return ``0`` if
there is no built-in module called *name*.
.. function:: is_frozen(name)
Return ``True`` if there is a frozen module (see :func:`init_frozen`) called
*name*, or ``False`` if there is no such module.
.. function:: load_compiled(name, pathname, [file])
.. index:: pair: file; byte-code
Load and initialize a module implemented as a byte-compiled code file and return
its module object. If the module was already initialized, it will be
initialized *again*. The *name* argument is used to create or access a module
object. The *pathname* argument points to the byte-compiled code file. The
*file* argument is the byte-compiled code file, open for reading in binary mode,
from the beginning. It must currently be a real file object, not a user-defined
class emulating a file.
.. function:: load_dynamic(name, pathname[, file])
Load and initialize a module implemented as a dynamically loadable shared
library and return its module object. If the module was already initialized, it
will be initialized *again*. Re-initialization involves copying the ``__dict__``
attribute of the cached instance of the module over the value used in the module
cached in ``sys.modules``. The *pathname* argument must point to the shared
library. The *name* argument is used to construct the name of the
initialization function: an external C function called ``initname()`` in the
shared library is called. The optional *file* argument is ignored. (Note:
using shared libraries is highly system dependent, and not all systems support
it.)
.. function:: load_source(name, pathname[, file])
Load and initialize a module implemented as a Python source file and return its
module object. If the module was already initialized, it will be initialized
*again*. The *name* argument is used to create or access a module object. The
*pathname* argument points to the source file. The *file* argument is the
source file, open for reading as text, from the beginning. It must currently be
a real file object, not a user-defined class emulating a file. Note that if a
properly matching byte-compiled file (with suffix :file:`.pyc` or :file:`.pyo`)
exists, it will be used instead of parsing the given source file.
.. class:: NullImporter(path_string)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment