From 7308c254a7a90e18726683e00c7a43170b663a41 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Fri, 4 Mar 2011 20:00:37 -0500 Subject: [PATCH] add python-cgi-template.py --- python-cgi-template.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 python-cgi-template.py diff --git a/python-cgi-template.py b/python-cgi-template.py new file mode 100755 index 0000000..c502747 --- /dev/null +++ b/python-cgi-template.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python + +import cgi +from subprocess import * + +# Enable these for debugging +#import cgitb +#cgitb.enable() + +def header(): + print "Content-Type: text/html\n" + +def printHead(title): + print ''' + %s +''' % title + +def main(): + header() + print '' + printHead('Title') + print '' + print '

%s

' % 'Title' + print '' + +if __name__ == "__main__": + main()