摘要: 假设我们想要导入上一级目录的文件或者模块,我们可以直接首先将环境变量添加到sys当中,sys这个模块包含了当前运行程序当中的所有运行环境变量,并保存在一个列表里,用sys.path可以对这个列表进行调用,因此 我们可以编写如下代码: import sys sys.path.insert(0,"the 阅读全文
posted @ 2021-07-21 22:49 Geeksongs 阅读(2781) 评论(0) 推荐(0) 编辑

Coded by Geeksongs on Linux

All rights reserved, no one is allowed to pirate or use the document for other purposes.