Python 获取脚本路径以及脚本所在文件夹路径

    import os
    script_path = os.path.realpath(__file__)
    script_dir = os.path.dirname(script_path)

posted on 2016-05-30 02:06  norsd  阅读(383)  评论(0编辑  收藏  举报

导航