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
+
returnPyInt_FromLong(display);
5150
+
}
5151
+
5142
5152
staticstruct PyMethodDef methods[] = {
5143
5153
{"show",
5144
5154
(PyCFunction)show,
5145
5155
METH_NOARGS,
5146
-
show__doc__
5156
+
"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
5157
},
5148
5158
{"choose_save_file",
5149
5159
(PyCFunction)choose_save_file,
@@ -5155,11 +5165,17 @@ - (int)index
5155
5165
METH_VARARGS,
5156
5166
"Sets the active cursor."
5157
5167
},
5168
+
{"get_main_display_id",
5169
+
(PyCFunction)get_main_display_id,
5170
+
METH_NOARGS,
5171
+
"Returns the display ID of the main display. This function fails if Python is not built as a framework."
5172
+
},
5158
5173
{NULL, NULL, 0, NULL}/* sentinel */
5159
5174
};
5160
5175
5161
5176
voidinit_macosx(void)
5162
5177
{ PyObject *m;
5178
+
5163
5179
import_array();
5164
5180
5165
5181
if (PyType_Ready(&GraphicsContextType) < 0) return;
0 commit comments