import os 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)