如何在Python中查找程序执行的当前目录? 要知道当前工作目录或pwd,请使用os模块。 阅读更多:Python 教程 例如 >>> import os >>> print(os.getcwd()) /home/ayush/qna