mod_python is more like CGI than PHP. What was missing was reversing the whole paradigm from "Start with a programming language, and add HTML generation" to "Start with an HTML page, and add little dynamic bits" which is what PHP did so amazingly well that it is still more or less the top server-side programming language despite its many deep flaws.