code: def pathsplit(value, sep=os.pathsep):
      '''
      Get enviroment PATH elements as list.
  
      This function only cares about spliting across OSes.
  
      :param value: path string, as given by os.environ['PATH']
      :type value: str
      :param sep: PATH separator, defaults to os.pathsep
      :type sep: str
      :yields: every path
      :ytype: str
      '''
      for part in value.split(sep):
          if part[:1] == part[-1:] == '"' or part[:1] == part[-1:] == '\'':
              part = part[1:-1]
          yield parf pathsplit(value, sep=os.pathsep):
      '''
      Get enviroment PATH elements as list.
  
      This function only cares about spliting across OSes.
  
      :param value: path string, as given by os.environ['PATH']
      :type value: str
      :param sep: PATH separator, defaults to os.pathsep
      :type sep: str
      :yields: every path
      :ytype: str
      '''
      for part in value.split(sep):
          if part[:1] == part[-1:] == '"' or part[:1] == part[-1:] == '\'':
              part = part[1:-1]
          yield part
docs: Get enviroment PATH elements as list.
  
      This function only cares about spliting across OSes.
  
      :param value: path string, as given by os.environ['PATH']
      :type value: str
      :param sep: PATH separator, defaults to os.pathsep
      :type sep: str
      :yields: every path
      :ytype: str