import os.path >>> abs=os.path.abspath("main.py") >>> abs 'D:\\test\\main.py' >>> file=os.path.basename(abs) #傳回檔案或目錄之絕對路徑
確定! 回上一頁