sys.argv[0] 就是脚本自身路径 不过据闻编译后此参数好像有影响,具体我没试过
import os,sys os.chdir(os.path.dirname(sys.argv[0]))
37,719
社区成员
34,239
社区内容
加载中
试试用AI创作助手写篇文章吧