I want to get the current file\'s directory path. I tried:
>>> os.path.abspath(__file__) \'C:\\\\python27\\\\test.py\'
But how can
System: MacOS
Version: Python 3.6 w/ Anaconda
import os rootpath = os.getcwd() os.chdir(rootpath)