File: class/Workbook/Exercises/Lab5/ex4.txt

% cat myclient.py
from mymod import countLines
from mymod import countChars
print countLines('mymod.py'), countChars('mymod.py')

% python myclient.py
13 346



[The rest of this one]

% cat mod1.py
somename = 42

% cat collector.py
from mod1 import *       # collect lots of names here
from mod2 import *       # from assigns to my names
from mod3 import *

>>> from collector import somename



[Home page] Books Code Blog Python Author Train Find ©M.Lutz