If I have a file test.py that resides in some directory, how can I find out from test.py what directory it is in? os.path.curdir will
test.py
os.path.curdir
import os dirname, filename = os.path.split(os.path.abspath(__file__))