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

Discussion in 'Python' started by Ames Andreas (MPA/DF), Aug 5, 2004.

  1. 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
     
    Ames Andreas (MPA/DF), Aug 5, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ames Andreas (MPA/DF)
    Replies:
    1
    Views:
    325
    Tim Roberts
    Aug 8, 2004
  2. Caleb Hattingh
    Replies:
    0
    Views:
    341
    Caleb Hattingh
    Dec 12, 2006
  3. Replies:
    0
    Views:
    647
  4. Replies:
    1
    Views:
    914
    Jack Klein
    Apr 13, 2005
  5. elodie

    $sth->errstr; and $sth->execute;

    elodie, Nov 7, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    234
    elodie
    Nov 7, 2011
Loading...

Share This Page