How to set the current working directory?

ricardo picture ricardo · Nov 27, 2009 · Viewed 822.8k times · Source

How to set the current working directory in Python?

Answer

Mark Byers picture Mark Byers · Nov 27, 2009

Try os.chdir

os.chdir(path)

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