summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/import.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/c-api/import.rst')
-rw-r--r--Doc/c-api/import.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/Doc/c-api/import.rst b/Doc/c-api/import.rst
index 71c9d83..de03f6e 100644
--- a/Doc/c-api/import.rst
+++ b/Doc/c-api/import.rst
@@ -124,12 +124,24 @@ Importing Modules
If *name* points to a dotted name of the form ``package.module``, any package
structures not already created will still not be created.
+ See also :func:`PyImport_ExecCodeModuleEx` and
+ :func:`PyImport_ExecCodeModuleWithPathnames`.
+
.. cfunction:: PyObject* PyImport_ExecCodeModuleEx(char *name, PyObject *co, char *pathname)
Like :cfunc:`PyImport_ExecCodeModule`, but the :attr:`__file__` attribute of
the module object is set to *pathname* if it is non-``NULL``.
+ See also :func:`PyImport_ExecCodeModuleWithPathnames`.
+
+
+.. cfunction:: PyObject* PyImport_ExecCodeModuleWithPathnames(char *name, PyObject *co, char *pathname, char *cpathname)
+
+ Like :cfunc:`PyImport_ExecCodeModuleEx`, but the :attr:`__cached__`
+ attribute of the module object is set to *cpathname* if it is
+ non-``NULL``. Of the three functions, this is the preferred one to use.
+
.. cfunction:: long PyImport_GetMagicNumber()
@@ -138,6 +150,11 @@ Importing Modules
of the bytecode file, in little-endian byte order.
+.. cfunction:: const char * PyImport_GetMagicTag()
+
+ Return the magic tag string for :pep:`3147` format Python bytecode file
+ names.
+
.. cfunction:: PyObject* PyImport_GetModuleDict()
Return the dictionary used for the module administration (a.k.a.