And now to sth. completely different: Forget about decorators, think cgi.FieldStorage

Ames Andreas (MPA/DF) Andreas.Ames at tenovis.com
Thu Aug 5 12:48:57 EDT 2004


Hi,

is it fair to assume that after executing the following code

fs = cgi.FieldStorage(fp = somefile, keep_blank_values = 1)
stream = fs.file or StringIO(fs.value)

stream is a seekable copy of somefile, i. e. stream.seek(0) works AND
stream's contents are the same a somefile's?  The docstring seems to
suggest that but I wanted to be certain.


tia,

andreas




More information about the Python-list mailing list