Python模块位置

Arc*_*oxx 2 python math location module

我一直试图找到一个模块的位置,但我不能搜索python文件夹但仍然无法找到它但我知道它在那里

>>> import math
>>> math.__path__
Traceback (most recent call last):
  File "<pyshell#13>", line 1, in <module>
    math.__path__
AttributeError: 'module' object has no attribute '__path__'
>>> math.__file__
Traceback (most recent call last):
  File "<pyshell#14>", line 1, in <module>
    math.__file__
AttributeError: 'module' object has no attribute '__file__'
Run Code Online (Sandbox Code Playgroud)

Ign*_*ams 5

如果它没有__file__属性那么这意味着它可能内置在Python库本身(或其他一些可执行文件)中,并且不存在于磁盘上.