import manual
import intrsc
import gridf
+import output
def argument_parser():
parser = argparse.ArgumentParser(description=__doc__)
print board
else:
+ game = output.Game(19, board) #TODO size parameter
for f in args.files[1:]:
try:
image = Image.open(f)
except IOError, msg:
print >> sys.stderr, msg
continue
+ if verbose:
+ print >> sys.stderr, "Opening", f
if image.mode == 'P':
image = image.convert('RGB')
board = intrsc.board(image, lines, show_all, do_something)
- for line in board:
- print ' '.join(line)
+ if args.sgf_output:
+ game.addMove(board)
+ else:
+ print board
+
+ if args.sgf_output:
+ print game.asSGF()
return 0
try:
sys.exit(main())
except KeyboardInterrupt: #TODO does this work?
- print "Interrupted."
+ print >> sys.stderr, "Interrupted."
sys.exit(1)