(filenames)
Yields games for the given filenames.

    If a file does not load or parse as a game, this writes a message
    to stderr and yields None. Processing of the argument list will
    continue if the caller continues.

    Args:
      filenames: The list of filenames.

    Yields:
      (filename, game), or (filename, None) if the file did not parse.
Yields games for the given filenames.
Yields games for the given filenames .
def _games_for_filenames(filenames):
    """Yields games for the given filenames.

    If a file does not load or parse as a game, this writes a message
    to stderr and yields None. Processing of the argument list will
    continue if the caller continues.

    Args:
      filenames: The list of filenames.

    Yields:
      (filename, game), or (filename, None) if the file did not parse.
    """
    for fname in filenames:
        if not fname.endswith('.p8.png') and not fname.endswith('.p8'):
            util.error('{}: filename must end in .p8 or .p8.png\n'.format(
                fname))
            continue

        g = None
        try:
            g = file.from_file(fname)
        except lexer.LexerError as e:
            util.error('{}: {}\n'.format(fname, e))
            util.debug(traceback.format_exc())
            yield (fname, None)
        except parser.ParserError as e:
            util.error('{}: {}\n'.format(fname, e))
            util.debug(traceback.format_exc())
            yield (fname, None)
        except util.InvalidP8DataError as e:
            util.error('{}: {}\n'.format(fname, e))
            util.debug(traceback.format_exc())
            yield (fname, None)
        else:
            yield (fname, g)
def _games_for_filenames ( filenames ) : for fname in filenames : if not fname . endswith ( '.p8.png' ) and not fname . endswith ( '.p8' ) : util . error ( '{}: filename must end in .p8 or .p8.png\n' . format ( fname ) ) continue g = None try : g = file . from_file ( fname ) except lexer . LexerError as e : util . error ( '{}: {}\n' . format ( fname , e ) ) util . debug ( traceback . format_exc ( ) ) yield ( fname , None ) except parser . ParserError as e : util . error ( '{}: {}\n' . format ( fname , e ) ) util . debug ( traceback . format_exc ( ) ) yield ( fname , None ) except util . InvalidP8DataError as e : util . error ( '{}: {}\n' . format ( fname , e ) ) util . debug ( traceback . format_exc ( ) ) yield ( fname , None ) else : yield ( fname , g )