XSLTools

tools/demo.py

233:15159e66b39a
2005-09-30 paulb [project @ 2005-09-30 22:53:43 by paulb] Added special "macro" attribute support: simpler attributes for use in templates. Also added experimental stylesheets for schema creation and for the production of generic processing stylesheets.
     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