helloThank you Lie and Kent.
I forgot  about newline character and the fact that string can be sliced.
Thanks for your timely help
BTW I have gone through  the Python library reference and find no examples
in fileinput module.

z=fileinput.input(file,inplace=1)
for line in  z:
???if len(line)<60:pass
???if len(line)>60:
??????line=line[:60]+'\n'+line[60:]
Is it the right way to do?

Thank you
Prasad
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to