 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
>>>
import amodule
|
|
|
| • |
If the
module was not loaded previously:
|
|
|
|
1. |
Find amodule.py among PYTHONPATH
|
|
|
|
2. |
If
necessary: byte-compile (amodule.pyc)
|
|
|
|
3. |
Execute
the code and create a module object (essentially a
|
|
dictionary
of global variables)
|
|
|
|
4. |
Store
the module object
|
|
|
| • |
When we
have a module object, bind that
|
|
|
module
object to the name ‘amodule’
|
|