I want to get the current file\'s directory path. I tried:
>>> os.path.abspath(__file__) \'C:\\\\python27\\\\test.py\'
But how can
I have made a function to use when running python under IIS in CGI in order to get the current folder:
import os def getLocalFolder(): path=str(os.path.dirname(os.path.abspath(__file__))).split('\\') return path[len(path)-1]