Call python script from web page and get results
Short answer is: no, this isn't possible.
Sure, they can download your script and run it themselves if they have a compatible version of Python installed, but you won't be able to run it from the browser (that would be a severe security problem!)
Your options are either to write it in JS, or create an API on your server, or find and use an existing API.
So, my project does a lot of mathematics for the user. It lets them enter equations and then solves them with some fairly complicated items like eigenvalues. I do some of this is javascript, but I have also written a python script utilizing numpy. I would like the user to be able to have the option of having the script on their local machine and then solving the mathematics there instead of on my server.
So, the user would enter an equation and hit enter. The javascript would then call a python script running on the users local machine. The equation is solved there with my code and the result is returned to the web page.
I thought that this would be possible with CGI, but I cannot seem to find clear documentation on how this would be accomplished. Is there a better way?
I do not want to run third party software and I do not want to run the python code in the browser.
Thanks