File: class/Workbook/Exercises/Lab4/commands.py

import string
from scanfile import scanner

count = 0

def processLine(line):
    global count
    count = count+1
    print count, string.upper(line)

scanner("data.txt", processLine)    # start scanner



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