def main(argv=sys.argv):
parser = argparse.ArgumentParser(description='Execute a skastic image.')
parser.add_argument('filename', help='Name of .ska.png file to execute')
parser.add_argument('--include', '-i', action='append', help='Include file', default=[])
parser.add_argument('--draw', action='append', help='Do not execute. For debugging an '
'image, display one of (contours, lines, connections, parse-tree)', default=[])
parser.add_argument('--dump-ast', action='store_true', help='Do not execute. For debugging, '
'dump ast')
args = parser.parse_args(argv[1:])
skastic = Skastic(args.filename, args)
if args.draw:
# Meh, probably better to wait for a key from the console?
cv2.waitKey(0)
评论列表
文章目录