和系统模块同名:比如本地有个模块叫code.py,从该模块导入的话在前面加路径.
from .code import load_train_test
https://blog.csdn.net/lipei1220/article/details/46506703
例如,在bc目录下的 test.py中 我想import 和bc同级test目录下的 abc:
bc/test.py
test/abc.py
在test.py中:
from __future__ import absolute_import
# 导入test目录中的abc模块
from test.abc import Function_test
# 导入当前
from .test import ...