python cd into directory code example
Example 1: python cd to script directory
import os
os.chdir(os.path.dirname(__file__))
Example 2: python cd to directory
import os
os.chdir(path)
import os
os.chdir(os.path.dirname(__file__))
import os
os.chdir(path)