Re: using python: crash, when importing gtk



-------- 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.

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

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


-- 
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]