Universal newline mode with cgi

oglycans at yahoo.com oglycans at yahoo.com
Tue Mar 15 21:37:34 CET 2005

I know

fs = open('file.txt','rU')

for universal newlines.
In a cgi script, I get files like this:

fs = form['file'].file

Is there a simple (simple!!! I don't want to do something like write to
a local file and then reopen) way to set the mode of fs in this case so
it does universal newlines?

More information about the Python-list mailing list