Index: Modules/_tkinter.c =================================================================== --- Modules/_tkinter.c (révision 68194) +++ Modules/_tkinter.c (copie de travail) @@ -2430,11 +2430,19 @@ Tkapp_MainLoop(PyObject *selfptr, PyObject *args) { int threshold = 0; - TkappObject *self = (TkappObject*)selfptr; + TkappObject *self; #ifdef WITH_THREAD PyThreadState *tstate = PyThreadState_Get(); #endif + if (PyModule_Check(selfptr)) { + self = NULL; + printf("module\n"); + } else { + self = (TkappObject*)selfptr; + printf("object\n"); + } + if (!PyArg_ParseTuple(args, "|i:mainloop", &threshold)) return NULL;