XSLTools

tools/demo.py

211:a4006b6da1a0
2005-08-25 paulb [project @ 2005-08-25 14:43:34 by paulb] Changed the path encoding to UTF-8 - if this is not correct, ISO-8859-1 will be tried anyway.
     1 #!/usr/bin/env python     2      3 "Start the demonstration program."     4      5 import os, sys     6      7 # Find out where XSLTools' distribution directory is.     8      9 cwd = os.getcwd()    10 parts = os.path.split(cwd)    11 if parts[-1] == "tools":    12     parts = parts[:-1]    13 base = os.path.join(*parts)    14     15 # Set up the environment and run the demo program.    16     17 pythonpath = os.environ.get("PYTHONPATH")    18 if pythonpath:    19     pythonpath = pythonpath + os.pathsep    20 else:    21     pythonpath = ""    22     23 os.environ["PYTHONPATH"] = "%s%s%s%s" % (pythonpath, base, os.pathsep, os.path.join(base, "examples", "Common"))    24 os.system("%s %s" % (sys.executable, os.path.join(base, "examples", "BaseHTTPRequestHandler", "DemoApp.py")))    25     26 # vim: tabstop=4 expandtab shiftwidth=4