code: def _open(self, archive):
          
          try:
              handle = unrarlib.RAROpenArchiveEx(ctypes.byref(archive))
          except unrarlib.UnrarException:
              raise BadRarFile("Invalid RAR file.")
          return handle
docs: Open RAR archive file.