1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tools/demo.py Sat Jul 16 20:36:23 2005 +0000
1.3 @@ -0,0 +1,24 @@
1.4 +#!/usr/bin/env python
1.5 +
1.6 +"Start the demonstration program."
1.7 +
1.8 +import os, sys
1.9 +
1.10 +# Find out where XSLTools' distribution directory is.
1.11 +
1.12 +cwd = os.getcwd()
1.13 +parts = os.path.split(cwd)
1.14 +if parts[-1] == "tools":
1.15 + parts = parts[:-1]
1.16 +base = os.path.join(*parts)
1.17 +
1.18 +# Set up the environment and run the demo program.
1.19 +
1.20 +pythonpath = os.environ["PYTHONPATH"]
1.21 +if pythonpath:
1.22 + pythonpath = pythonpath + os.pathsep
1.23 +
1.24 +os.environ["PYTHONPATH"] = "%s%s%s%s" % (pythonpath, base, os.pathsep, os.path.join(base, "examples", "Common"))
1.25 +os.system("%s %s" % (sys.executable, os.path.join(base, "examples", "BaseHTTPRequestHandler", "DemoApp.py")))
1.26 +
1.27 +# vim: tabstop=4 expandtab shiftwidth=4