0

我正在尝试在 Python 3.4 中使用 import_module。

我要导入的文件包含假定 numpy 已作为 np.xml 导入的函数。在我的主文件中,我设置了这个,但它没有与文件一起加载。

在文档中它写道:

模块 importlib 中函数 import_module 的帮助:

import_module(name, package=None) 导入一个模块。

The 'package' argument is required when performing a relative import. It
specifies the package to use as the anchor point from which to resolve the
relative import to an absolute import.

文档告诉我 package 选项是必需的,但我仍然不清楚如何使用它。谁能帮我 ?

4

0 回答 0