python set script path to script location code example
Example: python set cwd to script directory
abspath = os.path.abspath(__file__)
dname = os.path.dirname(abspath)
os.chdir(dname)
abspath = os.path.abspath(__file__)
dname = os.path.dirname(abspath)
os.chdir(dname)