ARTICLES > Web Programming

[Python] How to change directory path (windows) Turn Back

2019-07-03 10:47:51

 
Open interpreter console
>>> import os
>>> os.getcwd()
'C:\\Users\User_name\AppData\Local\Programs\Python\Python37-32'
>>> os.chdir('/temp/')
>>> os.getcwd()
'C:\\temp'
>>> 
 python change work directory path
Turn Back