parameters: (str)
return_statement: return str
docstring: Escape str such that it's interpreted as a single argument by
      the shell.
docstring_summary: Escape str such that it's interpreted as a single argument by
      the shell.
docstring_tokens: Escape str such that it s interpreted as a single argument by the shell .
function: def shell_escape(str):
      """Escape str such that it's interpreted as a single argument by
      the shell."""
  
      # This isn't complete, but it's just enough to make NINJA_PYTHON work.
      if platform.is_windows():
        return str
      if '"' in str:
          return "'%s'" % str.replace("'", "\\'")
      return str
function_tokens: def shell_escape ( str ) : # This isn't complete, but it's just enough to make NINJA_PYTHON work. if platform . is_windows ( ) : return str if '"' in str : return "'%s'" % str . replace ( "'" , "\\'" ) return str