Re: fileinput.input - newbie question

2005-09-02 Thread martijn
That works fine ;) Thanks for the fast help. GC-Martijn -- http://mail.python.org/mailman/listinfo/python-list

Re: fileinput.input - newbie question

2005-09-02 Thread Peter Otten
[EMAIL PROTECTED] wrote: > I'm testing some writing/reading with a file and i'm not sure if it is > possible to print/use the line with fileinput.input inplace=1 (see > below) fileinput.input(inplace=True) redirects stdout to the file[s] given as its first parameter. Instead of appearing on the s

fileinput.input - newbie question

2005-09-02 Thread martijn
I'm testing some writing/reading with a file and i'm not sure if it is possible to print/use the line with fileinput.input inplace=1 (see below) import fileinput thefile = fileinput.input('bla.txt',inplace=1,backup='.bak') for line in thefile: if line != "1\n": print line, #is it