You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warnings.warn("Python is not installed as a framework. The MacOSX backend may not work correctly if Python is not installed as a framework. Please see the Python documentation for more information on installing Python as a framework on Mac OS X")
staticchar show__doc__[] = "Show all the figures and enter the main loop.\nThis function does not return until all Matplotlib windows are closed,\nand is normally not needed in interactive sessions.";
PyErr_SetString(PyExc_RuntimeError, "Failed to obtain the display ID of the main display");
5147
+
returnNULL;
5148
+
}
5149
+
Py_INCREF(Py_True);
5150
+
return Py_True;
5151
+
}
5152
+
5142
5153
staticstruct PyMethodDef methods[] = {
5143
5154
{"show",
5144
5155
(PyCFunction)show,
5145
5156
METH_NOARGS,
5146
-
show__doc__
5157
+
"Show all the figures and enter the main loop.\nThis function does not return until all Matplotlib windows are closed,\nand is normally not needed in interactive sessions."
5147
5158
},
5148
5159
{"choose_save_file",
5149
5160
(PyCFunction)choose_save_file,
@@ -5155,11 +5166,17 @@ - (int)index
5155
5166
METH_VARARGS,
5156
5167
"Sets the active cursor."
5157
5168
},
5169
+
{"verify_main_display",
5170
+
(PyCFunction)verify_main_display,
5171
+
METH_NOARGS,
5172
+
"Verifies if the main display can be found. This function fails if Python is not built as a framework."
5173
+
},
5158
5174
{NULL, NULL, 0, NULL}/* sentinel */
5159
5175
};
5160
5176
5161
5177
voidinit_macosx(void)
5162
5178
{ PyObject *m;
5179
+
5163
5180
import_array();
5164
5181
5165
5182
if (PyType_Ready(&GraphicsContextType) < 0) return;
0 commit comments