diff options
Diffstat (limited to 'testSGF.py')
-rwxr-xr-x | testSGF.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testSGF.py b/testSGF.py new file mode 100755 index 0000000..6291033 --- /dev/null +++ b/testSGF.py @@ -0,0 +1,19 @@ +#!/usr/bin/python + +import sys +from imago.sgfParser.sgf import loadGameTree + +"""Gets a game from an SGF file.""" + +def main(): + filename = sys.argv[1] + move = loadGameTree(filename) + while move is not None: + move.printBoard() + if len(move.nextMoves) > 0: + move = move.nextMoves[0] + else: + move = None + +if __name__ == '__main__': + main() |