python中设置IDLE当前工作目录

Python 城市风 9/9/2020 4232 次 0 条

>>> import os
>>> os.getcwd()
'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python37'
>>> os.chdir('D:\\')
>>> os.getcwd()
'D:\\'