def get_matplotlib_backend_module_names():
 import_statement = '\nimport os, sys\n\n# Preserve stdout.\nsys_stdout = sys.stdout\n\ntry:\n    # Redirect output printed by this importation to "/dev/null", preventing\n    # such output from being erroneously interpreted as an error.\n    with open(os.devnull, \'w\') as dev_null:\n        sys.stdout = dev_null\n        __import__(\'%s\')\n# If this is an ImportError, print this exception\'s message without a traceback.\n# ImportError messages are human-readable and require no additional context.\nexcept ImportError as exc:\n    sys.stdout = sys_stdout\n    print(exc)\n# Else, print this exception preceded by a traceback. traceback.print_exc()\n# prints to stderr rather than stdout and must not be called here!\nexcept Exception:\n    sys.stdout = sys_stdout\n    import traceback\n    print(traceback.format_exc())\n'
 backend_names = eval_statement('import matplotlib; print(matplotlib.rcsetup.all_backends)')
 module_names = []
 if ((not is_darwin) and ('CocoaAgg' in backend_names)):
  backend_names.remove('CocoaAgg')
 for backend_name in backend_names:
  module_name = ('matplotlib.backends.backend_%s' % backend_name.lower())
  stdout = exec_statement((import_statement % module_name))
  if (not stdout):
   module_names.append(module_name)
   logger.info(('  Matplotlib backend "%s": added' % backend_name))
  else:
   logger.info(('  Matplotlib backend "%s": ignored\n    %s' % (backend_name, stdout)))
 return module_names

def get_matplotlib_backend_module_names ( ) : import_statement = '\nimport os, sys\n\n# Preserve stdout.\nsys_stdout = sys.stdout\n\ntry:\n    # Redirect output printed by this importation to "/dev/null", preventing\n    # such output from being erroneously interpreted as an error.\n    with open(os.devnull, \'w\') as dev_null:\n        sys.stdout = dev_null\n        __import__(\'%s\')\n# If this is an ImportError, print this exception\'s message without a traceback.\n# ImportError messages are human-readable and require no additional context.\nexcept ImportError as exc:\n    sys.stdout = sys_stdout\n    print(exc)\n# Else, print this exception preceded by a traceback. traceback.print_exc()\n# prints to stderr rather than stdout and must not be called here!\nexcept Exception:\n    sys.stdout = sys_stdout\n    import traceback\n    print(traceback.format_exc())\n' backend_names = eval_statement ( 'import matplotlib; print(matplotlib.rcsetup.all_backends)' ) module_names = [ ] if ( ( not is_darwin ) and ( 'CocoaAgg' in backend_names ) ) : backend_names . remove ( 'CocoaAgg' ) for backend_name in backend_names : module_name = ( 'matplotlib.backends.backend_%s' % backend_name . lower ( ) ) stdout = exec_statement ( ( import_statement % module_name ) ) if ( not stdout ) : module_names . append ( module_name ) logger . info ( ( '  Matplotlib backend "%s": added' % backend_name ) ) else : logger . info ( ( '  Matplotlib backend "%s": ignored\n    %s' % ( backend_name , stdout ) ) ) return module_names
list the names of all matplotlib backend modules importable under the current python installation .