# HG changeset patch # User paulb # Date 1141498449 0 # Node ID cacd04081909c1050271802bf8c2d9b37c67703d # Parent 89e049d9c60671e5aa876ca0406b5410d45c3c16 [project @ 2006-03-04 18:54:09 by paulb] Added a script which prepares the demonstration application's resources. diff -r 89e049d9c606 -r cacd04081909 tools/prepare_demo.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/prepare_demo.py Sat Mar 04 18:54:09 2006 +0000 @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +"Prepare the demonstration program's resources." + +import os, sys + +# Find out where the XSLTools distribution directory is. + +program = sys.argv[0] +cwd = os.path.split(program)[0] +parts = os.path.split(cwd) +if parts[-1] == "tools": + parts = parts[:-1] +base = os.path.join(*parts) + +# Set up the environment and obtain the demo resource. + +sys.path.append(base) +sys.path.append(os.path.join(base, "examples", "Common")) + +import DemoApp +DemoApp.prepare_resources() + +# vim: tabstop=4 expandtab shiftwidth=4