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)))
 return klass(None, dry_run, force)

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 ) ) ) return klass ( None , dry_run , force )
generate an instance of some ccompiler subclass for the supplied platform/compiler combination .