pygambit.gambit.read_agg#

pygambit.gambit.read_agg(filepath_or_buffer: str | Path | IOBase) Game#

Construct a game from its serialised representation in an AGG file.

Parameters:

filepath_or_buffer (str, pathlib.Path or io.IOBase) – The path to the file containing the game representation or file-like object

Returns:

A game constructed from the representation in the file.

Return type:

Game

Raises:
  • IOError – If the file cannot be opened or read

  • ValueError – If the contents of the file are not a valid game representation.