2021-03-07
阅读量:
899
如何改变python的默认路径为当前的工作路径
改变python的默认路径为当前的工作路径
通过os模块来进行python中路径的更改
默认路径为:
>>> import os >>> os.getcwd()
'D:\\Program Files\\Python35'
跳转到当前工作路径为
>>> os.chdir("D:\Program Files\Python35\modifyPath\test02")
>>> os.getcwd()'D:\\Program Files\\Python35\\ modifyPath \\ test02
66.6339
1
0
关注作者
收藏
评论(0)
发表评论
暂无数据
推荐帖子
0条评论
0条评论
0条评论

