导入模块

PyObject * PyImport_ImportModule ( const char * 名称 )
返回值:新引用。 属于 稳定 ABI (应用程序二进制接口) .

This is a wrapper around PyImport_Import() which takes a const char * as an argument instead of a PyObject * .

PyObject * PyImport_ImportModuleNoBlock ( const char * 名称 )
返回值:新引用。 属于 稳定 ABI (应用程序二进制接口) .

此函数是弃用别名化的 PyImport_ImportModule() .

3.3 版改变: This function used to fail immediately when the import lock was held by another thread. In Python 3.3 though, the locking scheme switched to per-module locks for most purposes, so this function’s special behaviour isn’t needed anymore.

Deprecated since version 3.13, will be removed in version 3.15: 使用 PyImport_ImportModule() 代替。