Lines Matching +full:builtin +full:- +full:modules
5 Importing Modules
14 single: modules (in module sys)
21 named module rather than the top-level package containing it as would otherwise
26 the module may still be created in the failure case --- examine ``sys.modules``
28 leaves the module in ``sys.modules``.
40 to be used in C functions that import other modules to execute a function.
43 the module from sys.modules and falls back to :c:func:`PyImport_ImportModule`
52 .. index:: builtin: __import__
54 Import a module. This is best described by referring to the built-in Python
58 The return value is a new reference to the imported module or top-level package,
61 when a submodule of a package was requested is normally the top-level package,
62 unless a non-empty *fromlist* was given.
69 ``-1`` as level, meaning relative import.
74 Import a module. This is best described by referring to the built-in Python
78 The return value is a new reference to the imported module or top-level package,
81 top-level package, unless a non-empty *fromlist* was given.
92 This is a higher-level interface that calls the current "import hook function".
103 .. index:: builtin: reload
105 Reload a module. This is best described by referring to the built-in Python
114 may be of the form ``package.module``. First check the modules dictionary if
115 there's one there, and if not, create a new one and insert it in the modules
128 .. index:: builtin: compile
131 read from a Python bytecode file or obtained from the built-in function
135 is removed from :attr:`sys.modules` in error cases, and even if *name* was already
136 in :attr:`sys.modules` on entry to :c:func:`PyImport_ExecCodeModule`. Leaving
137 incompletely initialized modules in :attr:`sys.modules` is dangerous, as imports of
138 such modules have no way to know that the module object is an unknown (and
151 *name* is removed from :attr:`sys.modules` in error cases.
157 the module object is set to *pathname* if it is non-``NULL``.
164 of the bytecode file, in little-endian byte order.
170 ``sys.modules``). Note that this is a per-interpreter variable.
179 this tells our caller it should fall back to the built-in import mechanism.
214 module is not found, and ``-1`` with an exception set if the initialization
216 :c:func:`PyImport_ImportModule`. (Note the misnomer --- this function would
240 module is imported, it is searched in this table. Third-party code could play
241 tricks with this to provide a dynamically created collection of frozen modules.
246 Add a single module to the existing table of built-in modules. This is a
247 convenience wrapper around :c:func:`PyImport_ExtendInittab`, returning ``-1`` if
256 Structure describing a single entry in the list of built-in modules. Each of
260 additional built-in modules. The structure is defined in
271 Add a collection of modules to the table of built-in modules. The *newtab*
274 Returns ``0`` on success or ``-1`` if insufficient memory could be allocated to
275 extend the internal table. In the event of failure, no modules are added to the