docs: def single_path_generator(pathname):
      """
      emits name,chunkgen pairs for the given file at pathname. If
      pathname is a directory, will act recursively and will emit for
      each file in the directory tree chunkgen is a generator that can
      be iterated over to obtain the contents of the file in multiple
      parts
      """
  
      if isdir(pathname):
          trim = len(pathname)
          if pathname[-1] != sep:
              trim += 1
          for entry in directory_generator(pathname, trim):
              yield entry
  
      else:
          zf = ZipFile(pathname)
          for f in zf.namelist():
              if f[-1] != '/':
                  yield f, zipentry_chunk(zf, f)
          zf.close()