2021-03-07
閱讀量:
874
如何改變python的默認(rèn)路徑為當(dāng)前的工作路徑
改變python的默認(rèn)路徑為當(dāng)前的工作路徑
通過os模塊來進(jìn)行python中路徑的更改
默認(rèn)路徑為:
>>> import os >>> os.getcwd()
'D:\\Program Files\\Python35'
跳轉(zhuǎn)到當(dāng)前工作路徑為
>>> os.chdir("D:\Program Files\Python35\modifyPath\test02") >>> os.getcwd()
'D:\\Program Files\\Python35\\ modifyPath \\ test02






評論(0)


暫無數(shù)據(jù)
推薦帖子
0條評論
0條評論
0條評論
0條評論