This is not a language compare question like asked on various forums. I am interested to know about more specific term core libraries/modules calling/execution in python. 
As I checked python modules installation directory like /usr/lib/python2.7 (On Ubuntu). I found .py (Source Code) and .pyc (Byte Code). I am assuming Python interpreter/compiler call .pyc file when we using import statement or more specifically called class/function from that module.        
While php is using .so (Shared object) files for libraries. As I seen on /usr/lib/php5/20090626. Yes python also have a directory /usr/lib/pyshared/python2.7 for .so files. But still lot of important libraries are stored as .pyc files. 
Is it not a good idea for using only .so extension for core libraries like php for performance benefits ?
.py files are compiles on the fly to .pyc files, the .pyc is used if it is more recent than the .py file.
Some modules can be written in C/C++, then they are delivered as a .so file.
php compare to python in perspective of core libraries