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