diff --git a/plugins/python-loader/gnm-python.c b/plugins/python-loader/gnm-python.c
index a9b01c9..6ba8463 100644
--- a/plugins/python-loader/gnm-python.c
+++ b/plugins/python-loader/gnm-python.c
@@ -44,6 +44,14 @@ static guint signals[LAST_SIGNAL] = { 0 };
 static GObjectClass *parent_class = NULL;
 
 static GnmPython *gnm_python_obj = NULL;
+ 
+static int
+cb_test_signals (void)
+{
+	if (PyErr_CheckSignals () < 0)
+		exit (0);
+	return TRUE;
+}
 
 static void
 gnm_python_init (GnmPython *gpy)
@@ -53,6 +61,7 @@ gnm_python_init (GnmPython *gpy)
 	gpy->interpreters = g_slist_append (NULL, gpy->default_interpreter);
 	g_return_if_fail (gnm_python_obj == NULL);
 	gnm_python_obj = gpy;
+	g_idle_add ((GSourceFunc) cb_test_signals, gnm_python_obj);
 }
 
 static void
@@ -60,6 +69,7 @@ gnm_python_finalize (GObject *obj)
 {
 	GnmPython *gpy = GNM_PYTHON (obj);
 
+	g_idle_remove_by_data (gnm_python_obj);
 	if (gpy->default_interpreter != NULL) {
 		GO_SLIST_FOREACH (gpy->interpreters, GnmPyInterpreter, interpreter,
 			if (interpreter != gpy->default_interpreter) {
