Preface
Modular programming is a way of organizing your program's source code. By organizing your code into modules (Python source files) and packages (collections of modules), and then importing those modules and packages into your program, you can keep your programs logically organized and keep potential problems to a minimum.
As your program grows and changes, you will often have to rewrite or expand certain parts of your code. Modular programming techniques help to manage these changes, minimizing side-effects, and keeping your code under control.
As you work with modular programming techniques, you will learn a number of common patterns for using modules and packages, including the divide and conquer approach to programming, the use of abstraction and encapsulation, and the idea of writing extensible modules.
Modular programming techniques are also a great way of sharing your code, either by making it available for other people to use or by reusing your code in another program. Using popular tools such as GitHub and the Python Package Index, you will learn how to publish your code, as well as use code written by other people.
Putting all these techniques together, you will learn how apply "modular thinking" to create better programs. You will see how modules can be used to deal with complexity and change in a large program and how modular programming really is the foundation of good programming technique.
By the end of the book, you will have an excellent understanding of how modules and packages work in Python and how to use them to create high-quality and robust software that can be shared with others.