def quote ( self , s ) : if six . PY2 : from pipes import quote else : from shlex import quote return quote ( s )
python passing a string with quotes
Return a shell - escaped version of the string s .
def quote(self, s):
        """Return a shell-escaped version of the string s."""

        if six.PY2:
            from pipes import quote
        else:
            from shlex import quote

        return quote(s)