[Tutor] Why not to use include?

Michael Langford mlangford.cs03 at gtalumni.org
Sun Jun 8 22:38:56 CEST 2008


Python makes web pages just fine. There are both embedded technologies
(such as the python server pages Kent mentioned above) and template
engines based on callbacks (such as django's templates, djangos the
whole way, etc).

Its extremely easy to make your own templating engine if you don't
like python server pages yet you like templating. (Using mod_python or
mod_wsgi[recommended] and the substitute function).

I suggest you really give wsgi (and mod_wsgi) a good hard look to
start off with, as its the python web standard now that all the other
toolkits are starting to conform to (or already do).
http://www.wsgi.org/wsgi/

Also, be very careful with memory in web python frameworks. Most php
processes die every time they are invoked from the web. Often python
web frameworks are more persistent then that:
http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/

       --Michael

On Sun, Jun 8, 2008 at 3:14 PM, Dotan Cohen <dotancohen at gmail.com> wrote:
> 2008/6/8 Andreas Kostyrka <andreas at kostyrka.org>:
>>> Very little of the pages are PHP, most is HTML. I understand that
>>> Python can be used as a web scripting language, so I assume that
>>> Python can be run in Apache from a page with an .html extension. Is
>>> this not the case, with an .httaccess directive?
>>
>> Generally no.
>
> If this is not the case, then why are there so many "PHP vs. Python"
> flame wars? PHP is designed for _only_ programming web pages, so far
> as I understand, so if Python cannot do that why are the two languages
> compared so often?
>
> Dotan Cohen
>
> http://what-is-what.com
> http://gibberish.co.il
> א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Michael Langford
Phone: 404-386-0495
Consulting: http://www.RowdyLabs.com


More information about the Tutor mailing list