def listContents(self):
    ''' List the contents of the archive (returns a list of path/filenames) '''
    retv    = []               # Return value
    archive = self._readNew()  # Archive struct
    entry   = self._entryNew() # Entry struct

    # detect compression and archive type
    self._readSupportFilterAll(archive)
    self._readSupportFormatAll(archive)

    # Open, analyse, and close our archive
    if self._readOpenFilename(archive, self.__fname, 10240) != self.ARCH_OK:
      print(self._errorString(archive))
      sys.exit(1)

    while self._readNextHeader(archive, ctypes.byref(entry)) == self.ARCH_OK:
      retv.append(self._entryPathname(entry))
      self._readDataSkip(archive) # Not strictly necessary

    if self._readFree(archive) != self.ARCH_OK:
      print(self._errorString(archive))
      sys.exit(1)

    # Return our list of archive entries
    return retv
 List the contents of the archive (returns a list of path/filenames) 
recipes/Python/578531_carpy_Ctypes_ARchiver_PYthlibarchive_ffi/recipe-578531.py