- Python中如何获取程序运行的文件夹目录的绝对路径
# -*- coding: utf-8 -*-
import os
print os.path.dirname(os.path.realpath(__file__))
# -*- coding: utf-8 -*-
import os
print os.path.dirname(os.path.realpath(__file__))
本文标题:Python Tips
本文链接:https://www.haomeiwen.com/subject/ksehxttx.html
网友评论