os.path

os.path.dirname(path)

去掉文件名,返回路径

os.path.abspath(__file__)

返回当前文件的绝对路径

posted @ 2019-11-19 16:43  刘小氓jiayou  阅读(69)  评论(0编辑  收藏  举报