r/Python • • Oct 26 '14

Run python scripts from web

Hello everyone,

I have some python scripts that I need people can execute via web, passing some variables to the script with a form.

Any idea? something where to start, I am so lost with this.

For example, a telnet script to enters a router and change some stuff.

What I need is a webpage with a form, where the user can pass some variables to the script, send the form, execute the script described above and show some output.

Its possible using only python? I dont want to use php in the web, I just want to use python.

any help is welcome thank you guys : )

0 Upvotes

10 comments sorted by

View all comments

2

u/santiagobasulto Oct 26 '14

It is possible. You could use Flask to put a simple webpage with your form. Check this out, in ten minutes you have your webapp working: http://flask.pocoo.org/docs/0.10/tutorial/

EDIT: I choosed Flask for simplicity. You can use pretty much anything. Django, Bottle, webapp2 (maybe with appengine). I was just trying to provide a simple example that it can be done easy.