| 75 | } |
| 76 | |
| 77 | def __init__(self): |
| 78 | # Only load entry points when first needed. |
| 79 | self._loaded_entry_points = False |
| 80 | |
| 81 | # Mapping of non-built-in backend to GUI framework, added dynamically from |
| 82 | # entry points and from matplotlib.use("module://some.backend") format. |
| 83 | # New entries have an "unknown" GUI framework that is determined when first |
| 84 | # needed by calling _get_gui_framework_by_loading. |
| 85 | self._backend_to_gui_framework = {} |
| 86 | |
| 87 | # Mapping of backend name to module name, where different from |
| 88 | # f"matplotlib.backends.backend_{backend_name.lower()}". These are either |
| 89 | # hardcoded for backward compatibility, or loaded from entry points or |
| 90 | # "module://some.backend" syntax. |
| 91 | self._name_to_module = { |
| 92 | "notebook": "nbagg", |
| 93 | } |
| 94 | |
| 95 | def _backend_module_name(self, backend): |
| 96 | if backend.startswith("module://"): |