Re: Modifying a row in a textfile

2009-09-12 Thread Dave Angel
Jorgen Grahn wrote: On Tue, 08 Sep 2009 14:21:59 +0200, Diez B. Roggisch 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 l

Re: Modifying a row in a textfile

2009-09-12 Thread Jorgen Grahn
On Tue, 08 Sep 2009 14:21:59 +0200, Diez B. Roggisch 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.readlin

Re: Modifying a row in a textfile

2009-09-08 Thread Diez B. Roggisch
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)

Modifying a row in a textfile

2009-09-08 Thread Olli Virta
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. Tanks! OV -- http://mail.python.org/mailman/listinfo/python-list