[Tutor] Why not to use include?

Dotan Cohen dotancohen at gmail.com
Sun Jun 8 21:11:34 CEST 2008


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.

Oh.

> Furthermore, Python is pretty bad language to embed in HTML, as whitespace is
> significant in Python.

That is one of the things that drew me to Python, actually. I like the
indentation structure and in any case I structure my PHP code with
indentation as well as {}.

>> Could I do something similar with a function? Something like
>> printHeader() and I would define that function in a class?
>
> Consult http://wiki.python.org/moin/WebProgramming first, please ;)

Thank you!

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?


More information about the Tutor mailing list