python-icgi
Python has 'cgi' and 'zope' or 'medusa' but nothing in-between. 'icgi' provides simple shortcuts to generating html pages and html fragments aswell as access to form values
See GettingStarted.
Simple HTML
With icgi is very easy to produce some quick valid html.
from icgi import html
print html.header("text/html")
print html.start_html({
"title":"icgi test page",
"lang":"en-GB",
"stylesheet":"test.css"})
print html.h1({},"Test of icgi")
print html.p({"class":"normaltext"},"hello this is a paragraph")
print html.end_html()The equivalent CGI.pm would have been:
use CGI;
my $q = new CGI;
print $q->header("text/html");
print $q->start_html({
title=>"CGI.pm test page",
lang =>"en-GB",
style=>{ src=> "test.css" },
});
print $q->h1("Test of CGI.pm");
print $q->p({class=>"normaltext"},"hello this is a paragraph")
print $q->end_html();