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
the answer is to use:
__file__
which returns a relative path.
os.path.abspath(__file__)
can be used to get the full path.