os.path.realpath('_file_') gives the wrong file path?

后端 未结 0 1762
温柔的废话
温柔的废话 2020-12-17 01:57
import os
dir_path = os.path.dirname(os.path.realpath(\'_file_\'))
dir_path

\'C:\\Users\\Mr. Caner\'

The file is in C: / Program Files (x86)

相关标签:
回答
  • 消灭零回复
提交回复
热议问题