How to set the current working directory? [duplicate]
Try os.chdir
os.chdir(path)
Change the current working directory to path. Availability: Unix, Windows.
import osprint os.getcwd() # Prints the current working directory
To set the working directory:
os.chdir('c:\\Users\\uname\\desktop\\python') # Provide the new path here