Monday, 2 September 2013

Building webpage: Possible to take input from an HTML form and use it as input into a Python function?

Building webpage: Possible to take input from an HTML form and use it as
input into a Python function?

Trying to build a webpage.
I would like to be able to take some user input from an HTML form, run a
python function on that input, and spit out some output back to the user.
Example: users input '2' into the HTML form, the python function doubles
it and returns '4' on the webpage (my actual function uses matrix algebra
so unlikely I could do it all in jQuery).
I'm using cherrypy but I am open to other modules. I'm at a loss as to how
to go about doing this as most cherrypy examples just print a string
without actually calling any python functions.

No comments:

Post a Comment