parameters: (cmd)
docstring: Find the full path to a command using which.
docstring_summary: Find the full path to a command using which.
docstring_tokens: Find the full path to a command using which .
function: def _find_cmd(cmd):
      """Find the full path to a command using which."""
      paths = System.Environment.GetEnvironmentVariable("PATH").Split(os.pathsep)
      for path in paths:
          filename = os.path.join(path, cmd)
          if System.IO.File.Exists(filename):
              return py3compat.decode(filename)
      raise OSError("command %r not found" % cmd)
function_tokens: def _find_cmd ( cmd ) : paths = System . Environment . GetEnvironmentVariable ( "PATH" ) . Split ( os . pathsep ) for path in paths : filename = os . path . join ( path , cmd ) if System . IO . File . Exists ( filename ) : return py3compat . decode ( filename ) raise OSError ( "command %r not found" % cmd )