我有一个文件夹:locust_runner
。其中有两个文件:locust_runner.py
和locust_maker.py
。在locust_maker.py
中,我想导入locust_runner
中定义的所有内容。你知道吗
如果我这样做了:
from .locust_runner import *
没有突出显示表明这是一个错误。但是,如果我运行它,我会得到:
SystemError: Parent module '' not loaded, cannot perform relative import
我尝试了from locust_runner import locust_runner
和我能想到的所有其他组合,但都没用。我怎样才能让它发挥作用?你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐