Example #1
0
def main(argv=None):
	try:
		if argv is None:
			argv = sys.argv[1:]
	
		parser = _mk_options_parser()
		options, args = parser.parse_args(argv)
	
		if len(args) == 0:
			parser.error("insufficient arguments, expected at least one path.")
			return 2

		res = parsing.parse(args, options.prune, options.mintime)
		if options.interactive or options.output == None:
			gui.show(res)
		else:
			filename = _get_filename(options.output)
			res_list = parsing.split_res(res, options.num)
			n = 1
			for r in res_list:
				if len(res_list) == 1:
					f = filename + "." + options.format
				else:
					f = filename + "_" + str(n) + "." + options.format
					n = n + 1
				batch.render(r, options.format, f)
				print "bootchart written to", f
		return 0
	except parsing.ParseError, ex:
		print("Parse error: %s" % ex)
		return 2
Example #2
0
			def render():
				batch.render(writer, res, options, filename)