[EMAIL PROTECTED] wrote: > Suppose I have a dos format text file. The following python code will > print ^M at the end. I'm wondering how to print it in unix format. > > fh = open(options.filename) > for line in fh.readlines() > print line, > > Thanks, > Peng > open(outfile, "wb").write(open(infile, "rb").read().replace("\r", ""))
Or something like that ... :) regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list