On Tue, 08 Sep 2009 14:21:59 +0200, Diez B. Roggisch <de...@nospam.web.de> wrote: > Olli Virta wrote: > >> Hi! >> >> I got a textfile made out of database records. Is there an easy way to >> modify rows in that file in case you have to take away some items here >> and there from each rows. > > for line in inf.readlines(): > if matches_criteria(line): > line = modify_line(line) > outf.write(line)
In other words, no. You need to put the results in another file. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . -- http://mail.python.org/mailman/listinfo/python-list