How do I get the full path of the current file's directory?

How do I get the current file's directory path? I tried:

>>> os.path.abspath(__file__)
'C:\\python27\\test.py'

But I want:

'C:\\python27\\'

← Назад к списку