#!/usr/local/bin/python """ Put this in your cgi-bin as directory simple_table.cgi. You will also need PyHtmlTable.py and twodarr.py Make sure you chmod 0755 PyHtmlTable.py simple_table.cgi twodarr.py """ import PyHtmlTable print 'Content-Type: text/html\n\n' print """ """ print " Simple Table Example " t = PyHtmlTable.PyHtmlTable(2,2, {'width':'400','border':2,'bgcolor':'white'}) t.setCellcontents(0,0,"T1 Cell 00") t.setCellcontents(0,1,"T1 Cell 01") t.setCellcontents(1,0,"T1 Cell 01") t.setCellcontents(1,1,"T1 Cell 11") t.setCellattrs(0,0,{'bgcolor':'red','width':100}) t.setCellattrs(1,1,{'bgcolor':'red'}) t.display() print ""