Using __init__ to connect modules

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

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.15.161