I have a python script that works from the command line. Instead of people running the script from command line and knowing which parameters go where I would like them to go to a webpage and select options and then run the script from the webpage. What is the easiest way to do this?
-
Are you using some sort of framework? If you have complete control of the app, just build it using some python web framework (like Django), import the script and invoke it (you may have to refactor it a bit).StoryTeller - Unslander Monica– StoryTeller - Unslander Monica2013-01-24 15:19:10 +00:00Commented Jan 24, 2013 at 15:19
-
Take a look at the wsgi plugin for whatever webserver you are running.kalhartt– kalhartt2013-01-24 16:02:00 +00:00Commented Jan 24, 2013 at 16:02
Add a comment
|
1 Answer
The easiest way to do this is using CGI plugin for your webserver that handles python scripts.
3 Comments
Siecje
My webserver is currently running on localhost can you please explain how I would set it up to call the python script
Aniket Inge
which webserver is it? @Siecje
Aniket Inge
@Siecje then see here: stackoverflow.com/questions/799354/… . especially the answer by JimB