How to do it...

In the previous recipes, one of our main challenges was how to combine two GUI technologies that were designed to be the one-and-only GUI toolkit for an application. We found various simple ways to combine them.

We will again launch the wxPython GUI from a tkinter GUI main event loop and start the wxPython GUI in its own thread, which runs within the Python.exe process.

In order to do this, we will use a shared global multiprocessing Python Queue.

While it is often best to avoid global data, in this recipe it is a practical solution and Python globals are really only global in the module they have been declared.

Here is the Python code that makes the two GUIs communicate with each other to a certain degree. In order to save ...

Get Python GUI Programming Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.