0

Possible Duplicate:
Accessing POST Data from WSGI

I'm very new to Python. I know how to receive HTML form data submitted from the client using CGI with the help of the class FieldStorage, but I don't know how to do the same using WSGI?

Could you please provide me with a short snippet of code doing that?

Community
  • 1
  • 1
King King
  • 61,710
  • 16
  • 105
  • 130
  • 1
    Don't try and write a WSGI app from scratch. Use a framework - a minimal one like Flask will do the trick and make things much easier for you. – Daniel Roseman Sep 19 '12 at 09:27
  • I'm still very new to Python so I don't want to jump into any framework, just try understanding the basics of WSGI first. Thanks! – King King Sep 19 '12 at 14:00
  • @Mu Mind: I don't think my question is really a duplicate of the question from your link. It seems that the solution there uses the class FieldStorage to deal the thing, well, it is not much different from using FieldStorage in CGI, and my question is for another solution without using FieldStorage? Anyway thank you so much! – King King Sep 19 '12 at 14:22
  • Daniel Roseman: "a minimal one like Flask"... Eh? Flask is definitely a modular framework, but I would call werkzeug the "minimal" framework when you're talking to someone who doesn't want the overhead of using FieldStorage ;) – Mu Mind Sep 19 '12 at 15:05
  • King King: but you do have your answer, right? I think you're mistaken to think that using FieldStorage is not the "WSGI way" just because it's defined in the `cgi` module. – Mu Mind Sep 19 '12 at 15:09

0 Answers0