Python查看当前文件的绝对路径

import os
print(os.path.abspath(__file__))

  

原文地址:https://www.cnblogs.com/lucktomato/p/15169121.html