def _describe_module(http, mod_name): if mod_name.endswith('.html'): mod_name = mod_name[:-5] body = pydoc.html.docmodule(imp.load_source(mod_name, '%s.py' % mod_name)) html.send_html_response(http, mod_name, body)
def _list_modules(http): module_names = [fn[:-3] for fn in os.listdir('.') if fn.endswith('.py')] body = _mod_listing_template % ''.join([_mod_li_template % (mod_name, mod_name) for mod_name in module_names]) html.send_html_response(http, 'Available Modules', body)