Can you set up Python to have the same pattern as PHP? I've always had to proxy the web server to the Python process running HTTP.
import cgi
Also, the httpd communicates to the CGI program via environment variables so one can also write their program in assembly.You also need to restart apache or change the wsgi loader file, (or set up explicit hoooks to do so) to get your new code to appear when debugging / after uploading changes. This is where I'd say php is superior (upload file, refresh browser).