(args)
return 0
Run the listlua tool.

    Args:
      args: The argparser parsed args object.

    Returns:
      0 on success, 1 on failure.
Run the listlua tool.
Run the listlua tool .
def listlua(args):
    """Run the listlua tool.

    Args:
      args: The argparser parsed args object.

    Returns:
      0 on success, 1 on failure.
    """
    for fname, g in _games_for_filenames(args.filename):
        if g is None:
            util.error('{}: could not load cart\n'.format(fname))
            if len(args.filename) == 1:
                return 1
            continue
        if len(args.filename) > 1:
            util.write('=== {} ===\n'.format(g.filename))

        for index, line in enumerate(g.lua.to_lines(
                writer_cls=(lua.PureLuaWriter if args.pure_lua else None))):
            if args.show_line_numbers:
                util.write('{}: {}'.format(index, _as_friendly_string(line)))
            else:
                util.write(_as_friendly_string(line))
        util.write('\n')

    return 0
def listlua ( args ) : for fname , g in _games_for_filenames ( args . filename ) : if g is None : util . error ( '{}: could not load cart\n' . format ( fname ) ) if len ( args . filename ) == 1 : return 1 continue if len ( args . filename ) > 1 : util . write ( '=== {} ===\n' . format ( g . filename ) ) for index , line in enumerate ( g . lua . to_lines ( writer_cls = ( lua . PureLuaWriter if args . pure_lua else None ) ) ) : if args . show_line_numbers : util . write ( '{}: {}' . format ( index , _as_friendly_string ( line ) ) ) else : util . write ( _as_friendly_string ( line ) ) util . write ( '\n' ) return 0