os.chdir(os.path.dirname(__file__))
abspath = os.path.abspath(__file__) dname = os.path.dirname(abspath) os.chdir(dname)