MCPcopy Index your code
hub / github.com/fabioz/PyDev.Debugger / find_gui_and_backend

Function find_gui_and_backend

pydev_ipython/matplotlibtools.py:60–73  ·  view source on GitHub ↗

Return the gui and mpl backend.

()

Source from the content-addressed store, hash-verified

58
59
60def find_gui_and_backend():
61 """Return the gui and mpl backend."""
62 matplotlib = sys.modules["matplotlib"]
63 # WARNING: this assumes matplotlib 1.1 or newer!!
64 backend = matplotlib.rcParams["backend"]
65
66 # Translate to the real case as in 3.9 the case was forced to lowercase
67 # but our internal mapping is in the original case.
68 realcase_backend = lowercase_convert.get(backend, backend)
69
70 # In this case, we need to find what the appropriate gui selection call
71 # should be for IPython, so we can activate inputhook accordingly
72 gui = backend2gui.get(realcase_backend, None)
73 return gui, backend
74
75
76def _get_major_version(module):

Callers 2

patched_useFunction · 0.85
activate_matplotlibFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected