1

I want to have a html file with buttons, and when I click on a button it should run a python script and display the output onto the browser as a webpage. Any help would be appreciated.

Sashaank
  • 15
  • 3

1 Answers1

0

Not sure if you mean "run a python script" in the browser or on a server.

If you want to run a Python script in the web-browser, you could use JavaScript to execute a run process, launching the Python script. I don't think there's a way to execute a Python script natively in a browser.

In order to run a Python script on the server, you can use Django, it's exactly what Django was designed for. You can see Uku Loskit's answer regarding this topic here.

MikeyE
  • 1,756
  • 1
  • 18
  • 37