1.现在的路径
filePath = os.path.dirname(__file__)
2.返回上一级路径
Path = os.path.dirname(old_path)
返回上上级路径
os.path.abspath(os.path.join(path, "../.."))
3.文件存在检测,没有就新建文件
if not os.path.exists(out_path):
os.makedirs(out_path)
4.列举路径的文件
files = os.listdir(Spath)