python set working directory in command line code example Example: python cd to directory import os os.chdir(path)