def _EscapeCppDefineForMSVS(s):
 s = _EscapeEnvironmentVariableExpansion(s)
 s = _EscapeCommandLineArgumentForMSVS(s)
 s = _EscapeVCProjCommandLineArgListItem(s)
 s = s.replace('#', ('\\%03o' % ord('#')))
 return s

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