def _EscapeVCProjCommandLineArgListItem(s):
 def _Replace(match):
  return ((((2 * match.group(1)) + '"') + match.group(2)) + '"')
 segments = s.split('"')
 for i in range(0, len(segments), 2):
  segments[i] = delimiters_replacer_regex.sub(_Replace, segments[i])
 s = '"'.join(segments)
 if ((len(segments) % 2) == 0):
  print >>sys.stderr, (('Warning: MSVS may misinterpret the odd number of ' + 'quotes in ') + s)
 return s

def _EscapeVCProjCommandLineArgListItem ( s ) : def _Replace ( match ) : return ( ( ( ( 2 * match . group ( 1 ) ) + '"' ) + match . group ( 2 ) ) + '"' ) segments = s . split ( '"' ) for i in range ( 0 , len ( segments ) , 2 ) : segments [ i ] = delimiters_replacer_regex . sub ( _Replace , segments [ i ] ) s = '"' . join ( segments ) if ( ( len ( segments ) % 2 ) == 0 ) : print >> sys . stderr , ( ( 'Warning: MSVS may misinterpret the odd number of ' + 'quotes in ' ) + s ) return s
escapes command line arguments for msvs .