def _EscapeCppDefineForMSBuild(s):
 s = _EscapeEnvironmentVariableExpansion(s)
 s = _EscapeCommandLineArgumentForMSBuild(s)
 s = _EscapeMSBuildSpecialCharacters(s)
 s = s.replace('#', ('\\%03o' % ord('#')))
 return s

def _EscapeCppDefineForMSBuild ( s ) : s = _EscapeEnvironmentVariableExpansion ( s ) s = _EscapeCommandLineArgumentForMSBuild ( s ) s = _EscapeMSBuildSpecialCharacters ( s ) s = s . replace ( '#' , ( '\\%03o' % ord ( '#' ) ) ) return s
escapes a cpp define so that it will reach the compiler unaltered .