我想获取当前文件的目录路径. 我试过了:
>>> os.path.abspath(__file__) 'C:\\python27\\test.py'
但是如何检索目录的路径?例如:
'C:\\python27\\'
python directory
directory ×1
python ×1