This chapter pulls together concepts from the earlier chapters to delve into how to create modules by example. If you follow the techniques described in this chapter, your modules will fit in with other modules and follow the import Python conventions.
A module is simply a Python source file that you choose to treat as a module. Simple as that sounds, you need to follow a few conventions when creating a module:
Document the module and all classes, methods, and functions in the module.
Test the module and include at least one test functi...
- 10. Building a Module
- from Beginning Python®: Using Python 2.6 and Python 3.1
- Publisher: Wrox
- Released: February 2010
Share this highlighthttp://www.safaribooksonline.com/a/beginning-python-using/2003/