parameters: (env=None)
return_statement: return path_list.split(pathsep)
docstring: Returns the sequence of directories that will be searched for the
      named executable (similar to a shell) when launching a process.
  
      *env* must be an environment variable dict or None.  If *env* is None,
      os.environ will be used.
docstring_summary: Returns the sequence of directories that will be searched for the
      named executable (similar to a shell) when launching a process.
docstring_tokens: Returns the sequence of directories that will be searched for the named executable ( similar to a shell ) when launching a process .
function: def get_exec_path(env=None):
      """Returns the sequence of directories that will be searched for the
      named executable (similar to a shell) when launching a process.
  
      *env* must be an environment variable dict or None.  If *env* is None,
      os.environ will be used.
      """
      # Use a local import instead of a global import to limit the number of
      # modules loaded at startup: the os module is always loaded at startup by
      # Python. It may also avoid a bootstrap issue.
      import warnings
  
      if env is None:
          env = environ
  
      # {b'PATH': ...}.get('PATH') and {'PATH': ...}.get(b'PATH') emit a
      # BytesWarning when using python -b or python -bb: ignore the warning
      with warnings.catch_warnings():
          warnings.simplefilter("ignore", BytesWarning)
  
          try:
              path_list = env.get('PATH')
          except TypeError:
              path_list = None
  
          if supports_bytes_environ:
              try:
                  path_listb = env[b'PATH']
              except (KeyError, TypeError):
                  pass
              else:
                  if path_list is not None:
                      raise ValueError(
                          "env cannot contain 'PATH' and b'PATH' keys")
                  path_list = path_listb
  
              if path_list is not None and isinstance(path_list, bytes):
                  path_list = fsdecode(path_list)
  
      if path_list is None:
          path_list = defpath
      return path_list.split(pathsep)
function_tokens: def get_exec_path ( env = None ) : # Use a local import instead of a global import to limit the number of # modules loaded at startup: the os module is always loaded at startup by # Python. It may also avoid a bootstrap issue. import warnings if env is None : env = environ # {b'PATH': ...}.get('PATH') and {'PATH': ...}.get(b'PATH') emit a # BytesWarning when using python -b or python -bb: ignore the warning with warnings . catch_warnings ( ) : warnings . simplefilter ( "ignore" , BytesWarning ) try : path_list = env . get ( 'PATH' ) except TypeError : path_list = None if supports_bytes_environ : try : path_listb = env [ b'PATH' ] except ( KeyError , TypeError ) : pass else : if path_list is not None : raise ValueError ( "env cannot contain 'PATH' and b'PATH' keys" ) path_list = path_listb if path_list is not None and isinstance ( path_list , bytes ) : path_list = fsdecode ( path_list ) if path_list is None : path_list = defpath return path_list . split ( pathsep )