Re: Python-list Digest, Vol 36, Issue 33

2006-09-03 Thread David J Birnbaum
Dear John (cc python-list), >> You may find (1) that the file has formfeeds in >> it or (2) it has r"\f" in in it and you were mistaken about the >> interpretation or (3) something else. >> > ... > >> Thank you for the quick response. Ultimately I need to remap the "f" in >> "\f" to somethi

overriding character escapes during file input

2006-09-02 Thread David J Birnbaum
Dear Python-list, I need to read a Unicode (utf-8) file that contains text like: > blah \fR40\fC blah I get my input and then process it with something like: > inputFile = codecs.open(sys.argv[1],'r', 'utf-8') > > for line in inputFile: When Python encounters the "\f" substring in an input line, i