def main(argv=None): """script main. parses command line options in sys.argv, unless *argv* is given. """ if not argv: argv = sys.argv # setup command line parser parser = E.OptionParser(version="%prog version: $Id$", usage=globals()["__doc__"]) parser.add_option("-t", "--test", dest="test", type="string", help="supply help") parser.add_option("--outfile", dest="outfile", type="string", help="output filename") # add common options (-h/--help, ...) and parse command line (options, args) = E.Start(parser, argv=argv) infiles = argv[-1] files_list = infiles.split(",") if not options.outfile: outfile = options.stdout else: outfile = options.outfile TS.mergeFiles(file_list=files_list, outfile=outfile) # write footer and output benchmark information E.Stop()