O'Reilly logo

Python GUI Programming Cookbook by Burkhard A. Meier

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Passing queues among different modules

In this recipe, we will pass Queues around different modules. As our GUI code increases in complexity, we want to separate the GUI components from the business logic, separating them out into different modules.

Modularization gives us code reuse and also makes the code more readable.

Once the data to be displayed in our GUI comes from different data sources, we will face latency issues, which is what Queues solve. By passing instances of Queues among different Python modules, we are separating the different concerns of the modules' functionalities.

Note

The GUI code ideally would only be concerned with creating and displaying widgets.

The business logic modules' job is to only do the business logic.

We have to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required