# HG changeset patch # User paulb # Date 1121546183 0 # Node ID 4eb3084362d4b89f033e09b0b6606c1768f9f441 # Parent 155c22486811e3a3f1e797fe9bdffd1993ac0f6f [project @ 2005-07-16 20:36:23 by paulb] Added a script to launch the demo, similar to the WebStack script. diff -r 155c22486811 -r 4eb3084362d4 tools/demo.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/demo.py Sat Jul 16 20:36:23 2005 +0000 @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +"Start the demonstration program." + +import os, sys + +# Find out where XSLTools' distribution directory is. + +cwd = os.getcwd() +parts = os.path.split(cwd) +if parts[-1] == "tools": + parts = parts[:-1] +base = os.path.join(*parts) + +# Set up the environment and run the demo program. + +pythonpath = os.environ["PYTHONPATH"] +if pythonpath: + pythonpath = pythonpath + os.pathsep + +os.environ["PYTHONPATH"] = "%s%s%s%s" % (pythonpath, base, os.pathsep, os.path.join(base, "examples", "Common")) +os.system("%s %s" % (sys.executable, os.path.join(base, "examples", "BaseHTTPRequestHandler", "DemoApp.py"))) + +# vim: tabstop=4 expandtab shiftwidth=4