Looking at Python modules and at code in the "lib-dnyload" directory in the Python framework, I noticed whenever code is creating some kind of GUI or graphic it imports a non-Python file with a .so extension. And there are tons .so files in "lib-dnyload". 
From googling things I found that these files are called shared objects and are written in C or C++. I have a Mac and I use GCC. How do I make shared object files that are accessible via Python? Mainly just how to make shared objects with GCC using Mac OS X.
You can write python extensions in many ways, including Cython, SWIG, boost.python ...
You can also write a shared library and use the "ctypes" library to access it.
How to create make .so files from code written in C or C++ that are usable from Python