2010-08-03 33 views

回答

0

平时没事!

form = cgi.FieldStorage() 

从源头

def __init__(self, fp=None, headers=None, outerboundary="", 
      environ=os.environ, keep_blank_values=0, strict_parsing=0): 
    """Constructor. Read multipart/* until last part. 

    Arguments, all optional: 

    fp    : file pointer; default: sys.stdin 
     (not used when the request method is GET) 

    headers   : header dictionary-like object; default: 
     taken from environ as per CGI spec 

    outerboundary : terminating multipart boundary 
     (for internal use only) 

    environ   : environment dictionary; default: os.environ 

    keep_blank_values: flag indicating whether blank values in 
     URL encoded forms should be treated as blank strings. 
     A true value indicates that blanks should be retained as 
     blank strings. The default false value indicates that 
     blank values are to be ignored and treated as if they were 
     not included. 

    strict_parsing: flag indicating what to do with parsing errors. 
     If false (the default), errors are silently ignored. 
     If true, errors raise a ValueError exception. 

    """ 
+0

那么,是什么意思呢?... – Evgeny 2010-08-03 19:52:27

+0

我的意思是,通常没有,但如果它在一个HTTPRequestHandler的do_GET中,我必须给它一些东西,因为全局变量没有关于表单的信息。 – Evgeny 2010-08-03 20:08:47

相关问题