os.path.dirname(file) 返回.py文件的绝对路径(完整路径)
os.path.absname(file)返回.py文件的目录
dirname和absname区别
原文:https://www.cnblogs.com/xflyer/p/10373258.html