Abstract
Once you have more than a hundred (or several hundred) lines of code in one Python file, it can be a little messy to manage all the functions and classes in the same place. Splitting your code over two or more module files that each cover one aspect of the functionality can simplify matters greatly.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
The import statement assumes your module files end with '.py'.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2016 Paul Gerrard
About this chapter
Cite this chapter
Gerrard, P. (2016). Using Modules. In: Lean Python. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-2385-7_5
Download citation
DOI: https://doi.org/10.1007/978-1-4842-2385-7_5
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-2384-0
Online ISBN: 978-1-4842-2385-7
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)