Classes, functions, and variable definitions can be collected into files for easy reuse and maintenance. A file containing these kinds of definitions is referred to as a module and has a suffix of .
py. In this chapter, we take a closer look at Jython modules.
As with functions and classes, when Jython processes a module file, new global and local namespaces are defined to identify the objects that are directly accessible within the file. For example, given a simple module, as shown in Listing 5.1, how are the objects in this file used by other scripts?
import statement is used to access the objects defined within a module ...