python获取文件的绝对路径 import os current_dir = os.path.dirname(os.path.abspath(__file__)) print(current_dir)