def selfTest2()

in pachi_py/pachi/tools/sgflib/sgflib.py [0:0]


def selfTest2(onConsole=0):
	""" Macintosh-based SGF file test"""
	import macfs
	print "\n\n********** Self-Test 2 (Mac) **********\n"
	thefile = macfs.PromptGetFile("Please choose an SGF file:")
	if not thefile[1]:
		return
	srcpath = thefile[0].as_pathname()
	src = open(srcpath, 'r')
	sgfdata = src.read()
	print "Input data:\n"
	print sgfdata
	print "\n\nParsed data:"
	col = SGFParser(sgfdata).parse()
	print "done\n"
	print str(col)