code: def iter_pth_paths(filename):
    
    try:
      f = open(filename, 'rU')  # noqa
    except IOError:
      return
  
    dirname = os.path.dirname(filename)
    known_paths = set()
  
    with f:
      for line in f:
        line = line.rstrip()
        if not line or line.startswith('#'):
          continue
        elif line.startswith(('import ', 'import\t')):
          try:
            exec_function(line, globals_map={})
            continue
          except Exception:
            # NB: import lines are routinely abused with extra code appended using `;` so the class of
            # exceptions that might be raised in broader than ImportError. As such we cacth broadly
            # here.
  
            # Defer error handling to the higher level site.py logic invoked at startup.
            return
        else:
          extras_dir, extras_dir_case_insensitive = makepath(dirname, line)
          if extras_dir_case_insensitive not in known_paths and os.path.exists(extras_dir):
            yield extras_dir
            known_paths.add(extras_dir_case_insensitive)
docs: Given a .pth file, extract and yield all inner paths without honoring imports. This shadows
    python's site.py behavior, which is invoked at interpreter startup.