-3
我正在看Python中的一些源代碼,並看到它正在導入genericpath模塊。我在哪裏可以找到這個模塊?Python 3.5 - 查看源代碼 - 哪裏可以找到genericpath模塊?
import genericpath
from genericpath import *
搜索genericpath被調高什麼......
我正在看Python中的一些源代碼,並看到它正在導入genericpath模塊。我在哪裏可以找到這個模塊?Python 3.5 - 查看源代碼 - 哪裏可以找到genericpath模塊?
import genericpath
from genericpath import *
搜索genericpath被調高什麼......
若要檢查模塊所在,你可以使用__file__
屬性。
>>> import genericpath
>>> genericpath.__file__
'C:\\Python27\\lib\\genericpath.pyc'
genericpath
包含os.path
模塊(ntpath
,posixpath
)公共實現。通常,您不應該明確使用這些名稱中的任何一個,os.path
將分派所有請求以更正基礎庫。
你是說上面的代碼在你的機器上失敗了嗎?請顯示堆棧跟蹤。 –
不,它工作正常。我只是想找到並看看通用路徑模塊 – timbram
一個好的開始將谷歌模塊的名稱。 –