摘要: python之文件路径与异常处理 一、文件路径 1、__file__:指当前文件的路径 2、os.path.abspath/os.path.realpath:获取绝对路径 os.path.abspath(__file__):获取当前文件的绝对路径 3、os.path.dirname:获取父目录路径 阅读全文
posted @ 2020-12-24 14:46 %女王% 阅读(922) 评论(0) 推荐(0) 编辑