FileSync
Overview
PythonicHtml is a simple Python library for writing HTML. Rather than writing so urce code inside HTML, as done with PHP or PSP, PythonicHtml allow you to define HTML structures as Python objects. For use in lightweight cgi or mod_python scripts.
PythonicHtml is not, and is not intended for, development of large, complex web systems. If this is your target, there are many better frameworks out there than this one. However, if you are developing a quick simple webapp and look for a more powerful way to code HTML than simply writing it as strings mixed up with your Python code, PythonicHtml may be of great use.
Usage
PythonicHtml defines one class for each existing html-element. For example, the following classes exist: Html, Body, H1, H2, P, Div and so on. Child elements and attributes may be specified as arguments to the constructor, or added to the object later. The resulting html is obtained by calling the method write on the top element of your object structure. Here is an example: PythonicHtml is very lightweight, suitable for use in cgi or mod_python applications.
The corresponding HTML can be obtained by calling write on any of the defined elements.
Download
PythonicHtml is hosted by SourceForge (http://pythonichtml.sourceforge.net/).
Author
Erik Billing, Ekhagen Electronic (www.ekhagen.org)
License
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.