#!/usr/bin/python import cgitb; cgitb.enable() import os import sys from ctf import config try: from tanks import Program, setup, conditions, actions, docs except: path = os.getcwd().split('/') path.pop() path.append('lib') sys.path.append(os.path.join('/', *path)) import Program, setup, conditions, actions, docs print(config.start_html('Tanks Documentation', links_title='Tanks', links=[('docs.cgi', 'Docs'), ('results.cgi', 'Results'), ('submit.html', 'Submit'), ('errors.cgi', 'My Errors')])) print Program.__doc__ print '
" docs.mkDocTable(setup.setup.values()) print '
' docs.mkDocTable(conditions.conditions.values()) print '
' docs.mkDocTable(actions.actions.values()) print(config.end_html())