Web development with Python 3.1
Dotan Cohen
dotancohen at gmail.com
Thu Oct 29 04:10:05 EDT 2009
> I think you're misunderstanding how Python and the web work together. Python
> is not PHP -- it was not designed to replace HTML, and it is in itself not a
> templating language. If you would like to use Python code embedded in HTML,
> the way PHP is typically used, you may want to look at Python Server Pages
> (http://www.modpython.org/live/current/doc-html/pyapi-psp.html) which are
> provided by mod_python.
>
I see, thank you! This is what has been bothering and confusing me. I
started with HTML and added PHP later, and the PHP fit in nicely
embedded in the HTML, and even though it's now HTML embedded in PHP
the principals are the same. Python doesn't seem to work that way, and
I have been having a hard time wrapping my head around just why.
> Just so you know (as I think this is what is causing much of the
> misunderstanding here), most Python web frameworks *do not* subscribe to the
> traditional model of the web, where URLs represent files on a server. (In
> the case of PHP, Python Server Pages, or CGI scripts, these are augmented
> files which are executed by the server, but it's the same concept). Instead,
> they typically map URLs to arbitrary code.
>
I don't think that I like that idea. I will give it a fair chance,
though, now that it problem has been identified.
Thank you very much for helping me understand this important distinction.
--
Dotan Cohen
http://what-is-what.com
http://gibberish.co.il
More information about the Python-list
mailing list