def cmdLineQuote(s):
 s = _cmdLineQuoteRe2.sub('\\1\\1', _cmdLineQuoteRe.sub('\\1\\1\\\\"', s))
 return (('"' + s) + '"')

def cmdLineQuote ( s ) : s = _cmdLineQuoteRe2 . sub ( '\\1\\1' , _cmdLineQuoteRe . sub ( '\\1\\1\\\\"' , s ) ) return ( ( '"' + s ) + '"' )
internal method for quoting a single command-line argument .