1
0
Fork 0
cartesi-python-chess/cartesi-python-chess-cartes.../python-chess-validate.py

14 lines
245 B
Python
Executable File

#!/usr/bin/python3
import chess.pgn
import logging
logging.getLogger("chess.pgn").setLevel(logging.CRITICAL)
pgn = open("/mnt/cartesi-python-chess/chess-game.pgn")
game = chess.pgn.read_game(pgn)
game.errors
print(("Errors:"), game.errors)