'Open and parse a RAR archive.
Parameters:
rarfile
archive file name
mode
only \'r\' is supported.
charset
fallback charset to use, if filenames are not already Unicode-enabled.
info_callback
debug callback, gets to see all archive entries.
crc_check
set to False to disable CRC checks
errors
Either "stop" to quietly stop parsing on errors,
or "strict" to raise errors.  Default is "stop".'

def __init__(self, rarfile, mode='r', charset=None, info_callback=None, crc_check=True, errors='stop'):

    self._rarfile = rarfile
    self._charset = (charset or DEFAULT_CHARSET)
    self._info_callback = info_callback
    self._crc_check = crc_check
    self._password = None
    self._file_parser = None
    if (errors == 'stop'):
        self._strict = False
    elif (errors == 'strict'):
        self._strict = True
    else:
        raise ValueError("Invalid    value    for    'errors'    parameter.")
    if (mode != 'r'):
        raise NotImplementedError('RarFile    supports    only    mode=r')
    self._parse()
