79572967

Date: 2025-04-14 10:58:43
Score: 0.5
Natty:
Report link

Python is not PHP

PHP works on the server directly, so when you send a request to the server it directs the request to the PHP script, so you can deal with the request and get the data that have been posted.

But Python does not work on the server environment, it works on the computer not by the server,

So the server can not call Python script and direct the request to the script.

Python needs to be working as a listener to HTTP requests, and then your server should redirect the requests that come to it to the Python listener, then python takes the request and deal with it, then send the response to the server then the server send the response to the client.

Because of that you can not use python for web development except using something provides these things, like a framework like:

Django , flask , etc.

Or of course you can make your own framework in the same idea.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Mohammed Almalki