1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/examples/BaseHTTPRequestHandler/RecursiveApp.py Sun Feb 17 19:21:57 2008 +0000
1.3 @@ -0,0 +1,15 @@
1.4 +#!/usr/bin/env python
1.5 +
1.6 +from WebStack.Adapters.BaseHTTPRequestHandler import deploy
1.7 +import Recursive
1.8 +
1.9 +# Get a simple Web site.
1.10 +
1.11 +resource = Recursive.get_site()
1.12 +
1.13 +# Special magic incantation.
1.14 +
1.15 +print "Serving..."
1.16 +deploy(resource, handle_errors=0)
1.17 +
1.18 +# vim: tabstop=4 expandtab shiftwidth=4
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/examples/CGI/RecursiveApp.py Sun Feb 17 19:21:57 2008 +0000
2.3 @@ -0,0 +1,22 @@
2.4 +#!/usr/bin/env python
2.5 +
2.6 +# NOTE: Path manipulation requires manual customisation.
2.7 +
2.8 +import sys
2.9 +#sys.path.append("/home/paulb/Software/Python/WebStack")
2.10 +#sys.path.append("/home/paulb/Software/Python/XSLTools")
2.11 +#sys.path.append("/home/paulb/Software/Python/XSLTools/examples/Common")
2.12 +#sys.path.append("/home/paulb/Software/Python/libxml2dom")
2.13 +
2.14 +from WebStack.Adapters.CGI import deploy
2.15 +import Recursive
2.16 +
2.17 +# Get a simple Web site.
2.18 +
2.19 +resource = Recursive.get_site()
2.20 +
2.21 +# Special magic incantation.
2.22 +
2.23 +deploy(resource, handle_errors=0)
2.24 +
2.25 +# vim: tabstop=4 expandtab shiftwidth=4
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/examples/ModPython/RecursiveApp/RecursiveHandler.py Sun Feb 17 19:21:57 2008 +0000
3.3 @@ -0,0 +1,24 @@
3.4 +#!/usr/bin/env python
3.5 +
3.6 +# NOTE: Path manipulation requires manual customisation.
3.7 +
3.8 +import sys
3.9 +#sys.path.append("/home/paulb/Software/Python/WebStack")
3.10 +#sys.path.append("/home/paulb/Software/Python/XSLTools")
3.11 +#sys.path.append("/home/paulb/Software/Python/XSLTools/examples/Common")
3.12 +#sys.path.append("/home/paulb/Software/Python/libxml2dom")
3.13 +
3.14 +from WebStack.Adapters import ModPython
3.15 +import Recursive
3.16 +
3.17 +# Get a simple Web site.
3.18 +
3.19 +resource = Recursive.get_site()
3.20 +
3.21 +# NOTE: Not sure if the resource should be maintained in a resource pool.
3.22 +
3.23 +def handler(req):
3.24 + global resource
3.25 + return ModPython.respond(req, resource, handle_errors=0)
3.26 +
3.27 +# vim: tabstop=4 expandtab shiftwidth=4
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/examples/Twisted/RecursiveApp.py Sun Feb 17 19:21:57 2008 +0000
4.3 @@ -0,0 +1,15 @@
4.4 +#!/usr/bin/env python
4.5 +
4.6 +from WebStack.Adapters.Twisted import deploy
4.7 +import Recursive
4.8 +
4.9 +# Get a simple Web site.
4.10 +
4.11 +resource = Recursive.get_site()
4.12 +
4.13 +# Special magic incantation.
4.14 +
4.15 +print "Serving..."
4.16 +deploy(resource, handle_errors=0)
4.17 +
4.18 +# vim: tabstop=4 expandtab shiftwidth=4