# HG changeset patch # User paulb # Date 1075653532 0 # Node ID 46d5e5fbc76b710ad6d8bc896232485ea483fdc3 # Parent 07c7d45437c6a20c7e23b8059e16e1199440bc19 [project @ 2004-02-01 16:38:52 by paulb] Enhanced the output for the simple application. diff -r 07c7d45437c6 -r 46d5e5fbc76b examples/Common/SimpleApplication/__init__.py --- a/examples/Common/SimpleApplication/__init__.py Sun Feb 01 16:38:34 2004 +0000 +++ b/examples/Common/SimpleApplication/__init__.py Sun Feb 01 16:38:52 2004 +0000 @@ -10,7 +10,30 @@ def respond(self, trans): trans.set_content_type(WebStack.Generic.ContentType("text/html")) + + # Get some information. + + path_info, path = "", "" + + try: + path_info = trans.get_path_info() + path = trans.get_path() + except NotImplementedError: + pass + out = trans.get_response_stream() - out.write("

Test

") + out.write(""" + + +

Test

+

+ Path: %s +

+

+ Path info: %s +

+ + +""" % (path, path_info)) # vim: tabstop=4 expandtab shiftwidth=4