I want to get the current file’s directory path.
I tried:
>>> os.path.abspath(__file__)
'C:\\python27\\test.py'
But how can I retrieve the directory’s path?
For example:
'C:\\python27\\'
I want to get the current file’s directory path.
I tried:
>>> os.path.abspath(__file__)
'C:\\python27\\test.py'
But how can I retrieve the directory’s path?
For example:
'C:\\python27\\'