code: def wrap_argument(text):
      
      if not any(x in text for x in [' ', '"', "'", '\\']):
          return text
      else:
          return '"%s"' % (text.replace('\\', r'\\').replace('"', r'\"'), )
docs: Wrap command argument in quotes and escape when this contains special characters.