Why include PHP and not Python?
All you need to do is:
- Take the official Python archive and include it as a sub folder called python.
- Add AddHandler cgi-script .py into apache's httpd.conf (the link below seemingly falsely claims it's mandatory to also add ScriptInterpreterSource Registry-Strict)
- Optionally add index.py, default.py and home.py to to the <IfModule dir_module> section in httpd.conf so these files could launch by default when browsing to folder
Then all one needs to is at this to the beginning of each PY file:
#!Python\python.exe (in Mac I guess it's
#!python)
See https://blog.terresquall.com/2021/10/running-python-in-xampp/