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
Is it possible to track the appearance on the website Yandex Advisor?
Working with API Telegram (MTProto + JS + PHP), how?
Split view in Visual Studio CODE?
How to format the data and do a comparison?
How to connect to FTP using windows?
Error "Not Connected" How to join?
Yii2 Url does not trigger the rule?
How to connect a library on the fly in C++?
More answers about
"Python script from an HTML form?"
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)
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?
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
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.
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?
commented on June 14th 19 at 19:29
I've never tried it myself.
Configure the Apache as shown, create mycoolweb.py where print give well, let "Hello world".
If the link
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.
commented on June 14th 19 at 19:32
Find more questions by tags