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

Using __init__ to connect modules

When we create a new Python project using the PyDev plugin for the Eclipse IDE, it automatically creates a __init__.py module. We can also create it ourselves manually when not using Eclipse.

Note

The __init__.py module is usually empty and then has a size of 0 kilobytes.

We can use this usually empty module to connect different Python modules by entering code into it. This recipe will show how to do this.

Getting ready

We will create a new GUI similar to the one we created in the previous recipe.

How to do it...

As our project becomes larger and larger, we naturally break it out into several Python modules. Using a modern IDE such as Eclipse, it is surprisingly complicated to find modules that are located in different ...

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