python如何设置路径

2,262次阅读
没有评论

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
神龙|纯净稳定代理IP免费测试>>>>>>>>天启|企业级代理IP免费测试>>>>>>>>IPIPGO|全球住宅代理IP免费测试
1

相关文章:

版权声明:wuyou2019-11-10发表,共计249字。
新手QQ群:570568346,欢迎进群讨论 Python51学习
评论(没有评论)