tim*_*ram -3 python python-3.x
我正在查看Python中的一些源代码,并看到它正在导入genericpath模块.我在哪里可以找到这个模块?
import genericpath
from genericpath import *
Run Code Online (Sandbox Code Playgroud)
搜索genericpath没有任何结果......
要检查模块所在的位置,您可以使用__file__属性.
>>> import genericpath
>>> genericpath.__file__
'C:\\Python27\\lib\\genericpath.pyc'
Run Code Online (Sandbox Code Playgroud)
genericpath包含os.path模块(ntpath,posixpath)的通用实现.通常,您不应该明确使用任何这些名称,os.path将所有请求分派给正确的底层库.
| 归档时间: |
|
| 查看次数: |
162 次 |
| 最近记录: |