#!/usr/bin/env python # -*- python -*- """Wrapper script for the *detect* preprocessor. Probably needs better argument handling...""" import sys, blockparser, detect, tempfile, os from string import join filename = sys.argv[1] structure = blockparser.parse(filename) structure = detect.process(structure) result = detect.output(structure) tmpName = tempfile.mktemp() tmp = open(tmpName,'w') tmp.write(result) tmp.close() try: os.system("/store/bin/python %s" % join([tmpName]+sys.argv[2:])) finally: os.remove(tmpName)