python獲取當前執行文件目錄

current_path = os.path.dirname(os.path.abspath(__file__))

這樣就能夠在其餘其餘模塊調用的時候不會出現找不到文件的狀況.spa

相關文章
相關標籤/搜索