import os
print('当前文件位置',os.path.abspath(__file__))
print('当前文件位置的上一级位置',os.path.dirname(os.path.abspath(__file__)))
print('进入文件夹app',os.path.join(os.path.dirname(os.path.abspath(__file__)),r'app'))
python获取当前路径
最新推荐文章于 2023-02-15 14:04:27 发布