I've got a bit of webdev experience, and just started learning python. I've created a python script that takes in an argument, and then runs a program, and prints print statements into the console. I'm curious if it's possible to put this program behind a webpage.
i.e. Webpage with a dropdown, chose the option and click a "Go" button. Then the python script is run with the option you chose, and your report is shown on the page.
I've looked at a few similar posts: Execute a python script on button click
run python script with html button
but they seem to offer very different solutions, and people seem to think the PhP idea is insecure. I'm also looking for something a bit more explicit. I'm fine to change the python script to return ajson or something instead of just print statements.