parameters: (cmd)
return_statement: return ' '.join(shell_quote(x) for x in cmd)
docstring: Escapes a command:
  	['ls', '-l', 'arg space'] -> ls -l 'arg space'
docstring_summary: Escapes a command:
  	['ls', '-l', 'arg space'] -> ls -l 'arg space'
docstring_tokens: Escapes a command : [ ls - l arg space ] - > ls - l arg space
function: def shell_escape(cmd):
  	"""
  	Escapes a command:
  	['ls', '-l', 'arg space'] -> ls -l 'arg space'
  	"""
  	if isinstance(cmd, str):
  		return cmd
  	return ' '.join(shell_quote(x) for x in cmd)
function_tokens: def shell_escape ( cmd ) : if isinstance ( cmd , str ) : return cmd return ' ' . join ( shell_quote ( x ) for x in cmd )