def main(argv):
	game_start = False
	
	
	for line in sys.stdin:
		line = line.strip()
		if line and not line.startswith("["):
			if not game_start:
				game_start = True
				game = []
			game.append(line)
		elif game_start:
			try:
				print_game(game)
			except:
				sys.stderr.write(str(game)+"\n")
			game_start = False
Process pgn file - ignores meta data.
dataset/ETHPy150Open nivm/learningchess/chess/checkmateclassifier/process_data.py/main