How to set the current working directory?

StackOverflow

How to set the current working directory in Python?

Answer rating: 880

Try os.chdir

os.chdir(path)

        Change the current working directory to path. Availability: Unix, Windows.

Answer rating: 141

Perhaps this is what you are looking for:

import os
os.chdir(default_path)




Tutorials