class_docstr: zipimporter(archivepath) -> zipimporter object
  
  Create a new zipimporter instance. 'archivepath' must be a path to
  a zipfile, or to a specific path inside a zipfile. For example, it can be
  '/tmp/myimport.zip', or '/tmp/myimport.zip/mydirectory', if mydirectory is a
  valid directory inside the archive.
  
  'ZipImportError is raised if 'archivepath' doesn't point to a valid Zip
  archive.
  
  The 'archive' attribute of zipimporter objects contains the name of the
  zipfile targeted.
class_docstr_tok: ["zipimporter","(","archivepath",")","-",">","zipimporter","object","Create","a","new","zipimporter","instance",".","'archivepath","'","must","be","a","path","to","a","zipfile",",","or","to","a","specific","path","inside","a","zipfile",".","For","example",",","it","can","be","'\/tmp\/myimport.zip","'",",","or","'\/tmp\/myimport.zip\/mydirectory","'",",","if","mydirectory","is","a","valid","directory","inside","the","archive",".","'ZipImportError","is","raised","if","'archivepath","'","does","n't","point","to","a","valid","Zip","archive",".","The","'archive","'","attribute","of","zipimporter","objects","contains","the","name","of","the","zipfile","targeted","."]
code: def __init__(self, path):
      if not isinstance(path, str):
          raise TypeError(f"expected str, not {type(path)!r}")
      if not path:
          raise ZipImportError("archive path is empty", path=path)
      if alt_path_sep:
          path = path.replace(alt_path_sep, path_sep)
  
      prefix = []
      while True:
          try:
              st = _bootstrap_external._path_stat(path)
          except (OSError, ValueError):
              # On Windows a ValueError is raised for too long paths.
              # Back up one path element.
              dirname, basename = _bootstrap_external._path_split(path)
              if dirname == path:
                  raise ZipImportError("not a Zip file", path=path)
              path = dirname
              prefix.append(basename)
          else:
              # it exists
              if (st.st_mode & 0o170000) != 0o100000:  # stat.S_ISREG
                  # it's a not file
                  raise ZipImportError("not a Zip file", path=path)
              break
  
      try:
          files = _zip_directory_cache[path]
      except KeyError:
          files = _read_directory(path)
          _zip_directory_cache[path] = files
      self._files = files
      self.archive = path
      # a prefix directory following the ZIP file path.
      self.prefix = _bootstrap_external._path_join(*prefix[::-1])
      if self.prefix:
          self.prefix += path_sep
  
imports: import _frozen_importlib_external
  from _frozen_importlib_external import _unpack_uint16, _unpack_uint32
  import _frozen_importlib
  import _imp
  import _io
  import marshal
  import sys
  import time
  import _warnings
label_desc: Use image node_id 1 to create a new zipimporter object from inherited base classes: _bootstrap_external with example: obj = zipimporter(path)