问题:
This question already has answers here :
这个问题已经在这里有了答案 :
Closed 2 years ago .
2年前关闭。
In Python, what commands can I use to find: 在Python中,我可使用哪些命令来查找: shell
- the current directory (where I was in the terminal when I ran the Python script), and 当前目录(运行Python脚本时我在终端中的位置),以及
- where the file I am executing is? 我正在执行的文件在哪里?
解决方案:
参考一: https://stackoom.com/question/LYUr/查找当前目录和文件目录-重复参考二: https://oldbug.net/q/LYUr/Find-current-directory-and-file-s-directory-duplicate