【Python爬蟲】os.path方法

經常使用方法 做用 os.path.dirname(file) 返回當前python執行腳本的執行路徑(看下面的例子),這裏file爲固定參數 os.path.abspath(file) 返回一個文件在當前環境中的絕對路徑,這裏file 一參數 os.path.join(basedir,file) 把目錄和文件名合成一個路徑 os.path.dirname(path) 返回文件路徑 os.path
相關文章
相關標籤/搜索