parameters: (plat=None, compiler=None, verbose=0, dry_run=0, force=0)
return_statement: return klass(None, dry_run, force)
docstring: Generate an instance of some CCompiler subclass for the supplied
      platform/compiler combination.  'plat' defaults to 'os.name'
      (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler
      for that platform.  Currently only 'posix' and 'nt' are supported, and
      the default compilers are "traditional Unix interface" (UnixCCompiler
      class) and Visual C++ (MSVCCompiler class).  Note that it's perfectly
      possible to ask for a Unix compiler object under Windows, and a
      Microsoft compiler object under Unix -- if you supply a value for
      'compiler', 'plat' is ignored.
docstring_summary: Generate an instance of some CCompiler subclass for the supplied
      platform/compiler combination.  'plat' defaults to 'os.name'
      (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler
      for that platform.  Currently only 'posix' and 'nt' are supported, and
      the default compilers are "traditional Unix interface" (UnixCCompiler
      class) and Visual C++ (MSVCCompiler class).  Note that it's perfectly
      possible to ask for a Unix compiler object under Windows, and a
      Microsoft compiler object under Unix -- if you supply a value for
      'compiler', 'plat' is ignored.
docstring_tokens: Generate an instance of some CCompiler subclass for the supplied platform / compiler combination . plat defaults to os . name ( eg . posix nt ) and compiler defaults to the default compiler for that platform . Currently only posix and nt are supported and the default compilers are traditional Unix interface ( UnixCCompiler class ) and Visual C ++ ( MSVCCompiler class ) . Note that it s perfectly possible to ask for a Unix compiler object under Windows and a Microsoft compiler object under Unix -- if you supply a value for compiler plat is ignored .
function: def new_compiler(plat=None, compiler=None, verbose=0, dry_run=0, force=0):
      """Generate an instance of some CCompiler subclass for the supplied
      platform/compiler combination.  'plat' defaults to 'os.name'
      (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler
      for that platform.  Currently only 'posix' and 'nt' are supported, and
      the default compilers are "traditional Unix interface" (UnixCCompiler
      class) and Visual C++ (MSVCCompiler class).  Note that it's perfectly
      possible to ask for a Unix compiler object under Windows, and a
      Microsoft compiler object under Unix -- if you supply a value for
      'compiler', 'plat' is ignored.
      """
      if plat is None:
          plat = os.name
  
      try:
          if compiler is None:
              compiler = get_default_compiler(plat)
  
          (module_name, class_name, long_description) = compiler_class[compiler]
      except KeyError:
          msg = "don't know how to compile C/C++ code on platform '%s'" % plat
          if compiler is not None:
              msg = msg + " with '%s' compiler" % compiler
          raise DistutilsPlatformError, msg
  
      try:
          module_name = "distutils." + module_name
          __import__ (module_name)
          module = sys.modules[module_name]
          klass = vars(module)[class_name]
      except ImportError:
          raise DistutilsModuleError, \
                "can't compile C/C++ code: unable to load module '%s'" % \
                module_name
      except KeyError:
          raise DistutilsModuleError, \
                ("can't compile C/C++ code: unable to find class '%s' " +
                 "in module '%s'") % (class_name, module_name)
  
      # XXX The None is necessary to preserve backwards compatibility
      # with classes that expect verbose to be the first positional
      # argument.
      return klass(None, dry_run, force)
function_tokens: def new_compiler ( plat = None , compiler = None , verbose = 0 , dry_run = 0 , force = 0 ) : if plat is None : plat = os . name try : if compiler is None : compiler = get_default_compiler ( plat ) ( module_name , class_name , long_description ) = compiler_class [ compiler ] except KeyError : msg = "don't know how to compile C/C++ code on platform '%s'" % plat if compiler is not None : msg = msg + " with '%s' compiler" % compiler raise DistutilsPlatformError , msg try : module_name = "distutils." + module_name __import__ ( module_name ) module = sys . modules [ module_name ] klass = vars ( module ) [ class_name ] except ImportError : raise DistutilsModuleError , "can't compile C/C++ code: unable to load module '%s'" % module_name except KeyError : raise DistutilsModuleError , ( "can't compile C/C++ code: unable to find class '%s' " + "in module '%s'" ) % ( class_name , module_name ) # XXX The None is necessary to preserve backwards compatibility # with classes that expect verbose to be the first positional # argument. return klass ( None , dry_run , force )