MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / get_options

Function get_options

pydev_ipython/qt_for_kernel.py:107–127  ·  view source on GitHub ↗

Return a list of acceptable QT APIs, in decreasing order of preference

()

Source from the content-addressed store, hash-verified

105
106
107def get_options():
108 """Return a list of acceptable QT APIs, in decreasing order of
109 preference
110 """
111 # already imported Qt somewhere. Use that
112 loaded = loaded_api()
113 if loaded is not None:
114 return [loaded]
115
116 mpl = sys.modules.get("matplotlib", None)
117
118 if mpl is not None and not check_version(mpl.__version__, "1.0.2"):
119 # 1.0.1 only supports PyQt4 v1
120 return [QT_API_PYQT_DEFAULT]
121
122 if os.environ.get("QT_API", None) is None:
123 # no ETS variable. Ask mpl, then use either
124 return matplotlib_options(mpl) or [QT_API_PYQT_DEFAULT, QT_API_PYSIDE, QT_API_PYSIDE2, QT_API_PYQT5, QT_API_PYQT6]
125
126 # ETS variable present. Will fallback to external.qt
127 return None
128
129
130api_opts = get_options()

Callers 1

qt_for_kernel.pyFile · 0.85

Calls 4

loaded_apiFunction · 0.90
check_versionFunction · 0.90
matplotlib_optionsFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected