Where is the math.py (socket.py, regex.py, etc.) source file?
If you can’t find a source file for a module it may be a builtin or dynamically loaded module implemented in C, C++ or other compiled language. In this case you may not have the source file or it may be something like mathmodule.c, somewhere in a C source directory (not on the Python Path). There are (at least) three kinds of modules in Python: • modules written in Python (.py); • modules written in C and dynamically loaded (.dll, .pyd, .so, .sl, etc); • modules written in C and linked with the interpreter; to get a list of these, type: import sys print sys.