-1

I have a form in an HTML page that reads input from a user (string x), and I have my python script that uses this variable.

What is the easiest way to fetch this variable from the HTML page by the python script (.py) and return the result - which should also be a string - to show it in the HTML page again?

baduker
  • 19,152
  • 9
  • 33
  • 56
Noura
  • 151
  • 1
  • 3
  • 10

1 Answers1

1

You can use either a modern WSGI environment like Flask or Django, or if the utility is very small, you can take a look at Common Gateway Interface (CGI).

JamieO
  • 11
  • 1
  • 2
  • Thanks, CGI is what I'm looking for, I try to use Django before but a lot of time needed to fix installation issues while I need it for a small utility. – Noura Mar 01 '18 at 09:30