def QuoteForRspFile(arg):
 arg = windows_quoter_regex.sub((lambda mo: ((2 * mo.group(1)) + '\\"')), arg)
 arg = arg.replace('%', '%%')
 return (('"' + arg) + '"')

def QuoteForRspFile ( arg ) : arg = windows_quoter_regex . sub ( ( lambda mo : ( ( 2 * mo . group ( 1 ) ) + '\\"' ) ) , arg ) arg = arg . replace ( '%' , '%%' ) return ( ( '"' + arg ) + '"' )
quote a command line argument so that it appears as one argument when processed via cmd .