Hi,
I tried this on a file:
for line in fileinput.input("myfile",inplace=1):
re.sub(r'LOOP',r'PRUEBALOOP',line)
and for lines like this:
PT_WT_INIT: LOOP
I got this:
'PT_WT_INIT: PRUEBALOOP\r\n'
I also tried without raw strings:
re.sub('LOOP','PRUEBALOOP',line)
but I got the same result.
Any hint?
Thanks, Jon.
_______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
