Front cover image for Modular Programming with Python

Modular Programming with Python

Cover -- Copyright -- Credits -- About the Author -- About the Reviewer -- www.PacktPub.com -- Table of Contents -- Preface -- Chapter 1: Introducing Modular Programming -- Introducing Python modules -- Introducing Python packages -- Using modules and packages to organize a program -- Why use modular programming techniques? -- Programming as a process -- The Python Standard Library -- Creating your first module -- Caching -- Writing a cache module -- Using the cache -- Summary -- Chapter 2: Writing Your First Modular Program -- The inventory control system -- Designing the inventory control system -- The data storage module -- The user interface module -- The report generator module -- The main program -- Implementing the inventory control system -- Implementing the data storage module -- Implementing the user interface module -- Implementing the report generator module -- Implementing the main program -- Summary -- Chapter 3: Using Modules and Packages -- Modules and packages -- Packages within packages -- Initializing a module -- Initialization functions -- Initializing a package -- How to import anything -- What does the import statement actually do? -- Using the import statement -- Relative imports -- Controlling what gets imported -- Circular dependencies -- Running modules from the command line -- Summary -- Chapter 4: Using Modules for Real-World Programming -- Introducing Charter -- Designing Charter -- Implementing Charter -- Implementing the chart.py module -- Implementing the generator.py module -- The Pillow library -- Renderers -- Testing the code -- Rendering the title -- Rendering the x axis -- The remaining renderers -- Testing Charter -- The fly in the ointment - changing requirements -- Redesigning Charter -- Refactoring the code -- Implementing the PDF renderer modules -- Testing the code -- Lessons learned -- Summary
eBook, English, 2016
Packt Publishing, Birmingham, 2016
1 Online-Ressource (246 Seiten)
9781785887673, 178588767X
1020858514