Os.path() 模块

来自linux中国网wiki
跳到导航 跳到搜索

os.path.abspath(file)

os.path.abspath(file)返回代码文件的所在的目录,不带文件名,返回绝对路径

see also

Python os.path() 模块

解析os.path.dirname(__file__)、os.path.abspath(__file__)、os.path.join()使用