Python script from an HTML form?

On the page there is a form with several input-AMI. It is the coefficients in the equation. There is a Python script that solves the equation, requiring the input of these coefficienty.

What is the struture must be a Web application that handles this? Call Python script from PHP? Or use CGI and completely handle all of Python?
June 14th 19 at 19:22
2 answers
June 14th 19 at 19:24
And to rewrite the script in PHP is not an option? The website should be put on PHP?
Website training, and besides there's nothing in it) - nikita.Stracke commented on June 14th 19 at 19:27
That is simply You don't know how to rewrite *.py to *.php? Or what? Script logic is? - Conrad.Stark commented on June 14th 19 at 19:30
Yes, there are mathematical calculations used larger numbers (which may not fit in 8 bytes) - in General, Python, this went perfectly, and on the same PHP it is extremely problematic to write - nikita.Stracke commented on June 14th 19 at 19:33
June 14th 19 at 19:26
Apache easily able to run python scripts
to transfer data and get the result.
Actually the first manual.
And how to bind to the form? Also, as a PHP file? Ie,

And then he'll have to return the HTML page?
- nikita.Stracke commented on June 14th 19 at 19:29
I've never tried it myself.
Configure the Apache as shown, create where print give well, let "Hello world".

If the link myserver/ receive the expected response, then the Python fulfills his bread.
will not prompt, then you are not receiving data, and sending the form data. Google where to catch them inside the Python script, and it's render the html generated in the same Python.
- Conrad.Stark commented on June 14th 19 at 19:32

Find more questions by tags PHPPythonWeb Development