fileinput module doesn't work to spec?
Carel Fellinger
cfelling at iae.nl
Tue Oct 24 14:41:19 EDT 2000
Dale Strickland-Clark <dale at out-think.nospamco.uk> wrote:
> According to the spec, the fileinput module should support overwriting
the specs are *always* right:), but keep a lot implicit:)
> table = []
> for line in fileinput.input(sys.argv[1:], inplace = 1):
> table = table + genRow(line)
printing in this loop will go to the file currently read
> print ''.join(table)
printing after the loop will again go to standard output.
--
groetjes, carel
More information about the Python-list
mailing list