0

I have a python cli script that asks for a series of different inputs, processes them and prints an output for every input, maintaining a state. Es:

form:Type your name

user: myname

script: your name is myname and it has 6 letters

form: Type your surname:

user: mysurname

script: your surname is mysurname and it has..

script: you are myname mysurname

I'd like to give it a web interface. I know how to use AJAX and CGI to get one single input and print one single output in a web page.

Is there a more elegant way to do it without splitting my script in several parts and recording its state inside a file?

marvin
  • 33
  • 3
  • 6
  • If you're using python and familiar with it I think you would easily be able to set up django as server side and then use a basic html file with some javascript to make an AJAX request to your python script. – Cody G Sep 10 '17 at 02:22
  • Possible duplicate of [How can I run my python script from within a web browser and process the results?](https://stackoverflow.com/questions/15959936/how-can-i-run-my-python-script-from-within-a-web-browser-and-process-the-results) – Cody G Sep 10 '17 at 02:23

0 Answers0