What this book covers
Chapter 1, Introducing Modular Programming, looks at the ways you can use Python modules and packages to help organize your programs, why it is important to use modular techniques, and how modular programming helps you to deal with the ongoing process of programming.
Chapter 2, Writing Your First Modular Program, introduces the divide and conquer approach to programming and applies this technique to the process of building an inventory control system based on modular programming principles.
Chapter 3, Using Modules and Packages, covers the nuts and bolts of modular programming using Python, including nested packages, package and module initialization techniques, relative imports, choosing what gets imported, and how to deal with circular references.
Chapter 4, Using Modules for Real-World Programming, uses the implementation of a chart-generation library to show how modular techniques help to deal with changing requirements in the best possible way.
Chapter 5, Working with Module Patterns, looks at a number of standard patterns for working with modules and packages, including the divide and conquer technique, abstraction, encapsulation, wrappers, and how to write extensible modules using dynamic imports, plugins, and hooks.
Chapter 6, Creating Reusable Modules, shows how to design and create modules and packages that are intended to be shared with other people.
Chapter 7, Advanced Module Techniques, looks at some of the more distinctive aspects of modular programming in Python, including optional and local imports, tweaking the module search path, "gotchas" to be aware of, how to use modules and packages for rapid application development, working with package globals, package configuration, and package data files.
Chapter 8, Testing and Deploying Modules, examines the concept of unit testing, how to prepare your modules and packages for publication, how to upload and publish your work, and how to make use of modules and packages written by other people.
Chapter 9, Modular Programming as a Foundation for Good Programming Technique, shows how modular techniques help to deal with the ongoing process of programming by dealing with change and managing complexity, and how modular programming techniques help you to be a more effective programmer.