Read text files with a specific encoding? using fileinput?
Skip Montanaro
skip at pobox.com
Fri Feb 14 17:21:05 EST 2003
Jim> I could write my own replacement for fileinput that did that, but
Jim> currently the fileinput module does all the opening, so absent an
Jim> open hook or a way to tell it what encoding to use, I'm not sure
Jim> that will help.
Sorry, my bad. I forgot that fileinput is rather unpythonic in its
treatment of files (accepting just names and not file objects, and even
getting the names from an implicit source).
Skip
More information about the Python-list
mailing list