python - Proper way to process html form in BaseHTTPHandler -


I know that I have to use CG. Field storage for this. But how do I get started with it?

  def do_GET (self): form = cgi.FieldStorage (what should be here?!)  

Thanks!

I searched, but I could not find any answer: (

usually

  source = cgi.FieldStorage ()  

from the source

  def __init __ (self, fp = any No, headers = none, external bundle = "", environment = os.environ, keep_blank_values ​​= 0, strict_parings = 0): "" "constructor.multipart read / up to the last part. Logic, all optional: fp: file Pointer; default: Sys.stdin (when the request method is not received) Header: Header dictionary-like object; ्ट: CGI Speak is taken from the environment according to external borders: terminates multipath limits (internal use only) environment: environment dictionary; default: OS .environment keep_blank_values: showing whether the empty values ​​in flag url encoded forms empty Should be considered as a string. A correct value indicates that the spaces should be retained as empty strings. That is ignored in the blank values ​​and as they are not included as they were not included. Strict_precation: Flag indicates what to do with parsing errors if wrong (default), errors are silently ignored. If true, error increases a ValueError exception "" "" " 

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -