That works fine ;)
Thanks for the fast help.
GC-Martijn
--
http://mail.python.org/mailman/listinfo/python-list
[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
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