1 #!/usr/bin/env python 2 3 "Prepare the demonstration program's resources." 4 5 import os, sys 6 7 # Find out where the XSLTools distribution directory is. 8 9 program = sys.argv[0] 10 cwd = os.path.split(program)[0] 11 parts = os.path.split(cwd) 12 if parts[-1] == "tools": 13 parts = parts[:-1] 14 base = os.path.join(*parts) 15 16 # Set up the environment and obtain the demo resource. 17 18 sys.path.insert(0, base) 19 sys.path.insert(0, os.path.join(base, "examples", "Common")) 20 21 import DemoApp 22 DemoApp.prepare_resources() 23 24 # vim: tabstop=4 expandtab shiftwidth=4