【python】添加路径
动态添加路径
import sys
# 添加当前工作目录到 Python 的路径中
current_dir = os.getcwd()
if current_dir not in sys.path:
sys.path.append(current_dir)
import sys
# 添加当前工作目录到 Python 的路径中
current_dir = os.getcwd()
if current_dir not in sys.path:
sys.path.append(current_dir)