Python Webpages

Johan Fredrik Øhman johanfo at essay.org
Mon Apr 29 17:41:06 EDT 2002


> I must admit I have never yet seen a system which integrates HTML and
> code in the same file without the file ending up an unreadable mess.

I just thought of great idea:  How about using one file and not mix html and
python code at the same time ?
Example:
==================================================
<html>
    <body>
    %content%
    </body>
</html>

<!--PYTHON Code
from smartTemplates import *

page.content =  "Isn't this cool ;)"

-->
==================================================

In this example you dont mix the content and code, but keep it in the same
file.
By embedding the code in html comment tags it becomes trivial to edit the
file in most
WYSIWYG editors like Dreamweaver.

--
JFØ





More information about the Python-list mailing list