def main(argv = sys.argv):
    try:
        if 3 > len(sys.argv):
            raise Exception(usage(argv))

        root_style.style("tdrstyle.C")

        compareFiles(**dict(x.split(':') for x in sys.argv[1:] if ':' in x))
    except Exception as error:
        print(error, file = sys.stderr)

        return 1
    else:
        return 0
예제 #2
0
def main(argv=sys.argv):
    try:
        if 2 > len(argv):
            raise Exception(usage(argv))

        root_style.style("tdrstyle.C")

        generateCDF([x for x in argv[1:] if ":" not in x][0], **dict((x.split(":") for x in argv[1:] if ":" in x)))

    except Exception as error:
        print(error, file=sys.stderr)

        return 1
    else:
        return 0
def main(argv = sys.argv):
    try:
        if 5 > len(argv):
            raise Exception(usage(argv))

        root_style.style("tdrstyle.C")

        files = dict([x.split(':') for x in argv[1:] if ':' in x])
        templates = set([x for x in argv[1:] if ':' not in x])

        files = dict([[x + "_file", files.get(x)] for x in ["in", "with", "to"]])

        replace_template.replace(templates, **files)

    except Exception as error:
        print(error, file = sys.stderr)

        return 1
    else:
        return 0