We created a class called QtPython that wraps the Python C API for us.
Never use a Q prefix to call your custom classes, as this prefix is reserved for official Qt classes. This is to ensure that your code will never have a name clash with future code added to Qt. The Qt prefix, on the other hand, is meant to be used with classes that are extensions to Qt. You probably still shouldn't use it, but the probability of a name clash is much smaller and yields a lesser impact than clashes with an official class. It is best to come up with an application-specific prefix or use a namespace.
The class constructor creates a Python interpreter, and the class destructor destroys it. We use Py_InitializeEx(0), which has the same functionality ...