June 2000
Intermediate to advanced
556 pages
8h 45m
English
In chapter 3, when we proved the existence of the XML package, we executed a program called testpyexpat.py. If you looked inside this program, you will have seen that the first executable line looks like this:
CD-ROM reference=6048.txt from xml.parsers import pyexpat
This is another variation on the syntax of an import statement. A collection of modules can be organized into a hierarchical collection of submodules. Any dots in a module name are interpreted as separating the overall module collection (or package) into submodules.
Typically, the dotted module names will map onto directory hierachies. So, for example, we can tell by looking at the above import statement that there is a subdirectory called parsers in the XML package ...
Read now
Unlock full access