python的目錄操做,os,os.path

設定項目路徑爲:E:\StudySpace\pythonStudySpace 文件路徑爲:E:\StudySpace\pythonStudySpace\try_os\try_os.pypython # 獲取當前腳本文件所在的目錄絕對路徑 os.path.abspath(os.path.dirname(__file__)) # 獲取當前腳本上級目錄 os.path.dirname(os.path.d
相關文章
相關標籤/搜索