(filename)
Loads a game from a named file.

    Args:
        filename: The name of the file. Must end in either ".p8" or
        ".p8.png".

    Returns:
        A Game containing the game data.

    Raises:
        lexer.LexerError
        parser.ParserError
        InvalidP8HeaderError
Loads a game from a named file.
Loads a game from a named file .
def from_file(filename):
    """Loads a game from a named file.

    Args:
        filename: The name of the file. Must end in either ".p8" or
        ".p8.png".

    Returns:
        A Game containing the game data.

    Raises:
        lexer.LexerError
        parser.ParserError
        InvalidP8HeaderError
    """
    fmt = formatter_for_filename(filename=filename)
    with open(filename, 'rb') as fh:
        return fmt.from_file(fh, filename=filename)
def from_file ( filename ) : fmt = formatter_for_filename ( filename = filename ) with open ( filename , 'rb' ) as fh : return fmt . from_file ( fh , filename = filename )