I want to get the current file\'s directory path. I tried:
>>> os.path.abspath(__file__) \'C:\\\\python27\\\\test.py\'
But how can
## IMPORT MODULES import os ## CALCULATE FILEPATH VARIABLE filepath = os.path.abspath('') ## ~ os.getcwd() ## TEST TO MAKE SURE os.getcwd() is EQUIVALENT ALWAYS.. ## ..OR DIFFERENT IN SOME CIRCUMSTANCES