Re: using python: crash, when importing gtk
- From: Jean Brefort <jean brefort normalesup org>
- To: scrutinizer gmx at
- Cc: gnumeric-list gnome org
- Subject: Re: using python: crash, when importing gtk
- Date: Sat, 05 May 2012 15:44:42 +0200
Le vendredi 04 mai 2012 à 07:32 +0200, scrutinizer gmx at a écrit :
-------- Original-Nachricht --------
Datum: Wed, 02 May 2012 14:06:41 +0200
Von: "Jean Bréfort" <jean brefort normalesup org>
An: scrutinizer gmx at
CC: gnumeric-list gnome org
Betreff: Re: using python: crash, when importing gtk
1.11.3 should NOT build with Python support. It should fail at configure
stage.
Hello Jean, I don't understand why.
It should fail because things can't work currently. It does not fail
actually, and this is a bug.
You are using pygtk which depends on gtk+-2.0 from a gtk+-3.0 program,
so the crash is anticipated.
I tried using PyGI instead. A dialog appears, but then, after pressing the ok button, gnumeric hangs.
gnumeric
/usr/lib/python2.7/dist-packages/gi/_gobject/constants.py:24: Warning: g_boxed_type_register_static:
assertion `g_type_from_name (name) == 0' failed
from . import _gobject
Hmm, this is clearly a bug. Something tries to initialize gobject type a
second time, and, of course, this fails. I'm suspecting this occurs
during gnm_python_init() execution. This code needs much love in order
to work. It currently imports pygtk wich is not compatible with gtk-3.
Regards,
Jean
the mini test plugin:
from gi.repository import Gtk
import Gnumeric
# Called when user presses "OK" in dialog.
def cb_ok_test (dialog, event):
dialog.destroy()
# Populate sheet and show dialog.
def f_transpose(gui):
dialog = Gtk.MessageDialog(None,
Gtk.DialogFlags.DESTROY_WITH_PARENT,
Gtk.MessageType.INFO,
Gtk.ButtonsType.OK,
"Press OK to transpose")
dialog.connect('response', cb_ok_test)
dialog.run()
# This dictinary binds verbs to Python functions.
transpose_ui_actions = {
'Transpose': f_transpose,
}
--
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]