GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Aug 31, 2016 12:26 am

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Python 3.2 and GTK3
PostPosted: Thu Jul 05, 2012 1:15 pm 

Joined: Thu Jul 05, 2012 12:54 pm
Posts: 1
Hi all,

I cannot get the draw signal to work in with Python 3. The following code is a bare bones examples of what I mean:

#!/usr/biqn/env python3.2

from gi.repository import Gtk, Gdk
class MyExample(object):
  def __init__(self, user_data=None):
    window = Gtk.Window()
    window.connect("destroy", Gtk.main_quit)
    drawing_area = Gtk.DrawingArea()

  def expose(self,widget,cr):
    print ("self_exposed")

# ===
if __name__ == "__main__":
    app = MyExample()

It runs fine with 2.7, but on 3.2 the screen appears but the expose function never seems to run and when I quit the program I get the following message:

Exception TypeError: TypeError("Couldn't find conversion for foreign struct 'cairo.Context'",) in <module 'threading' from '/usr/lib/python3.2/'> ignored

I am using Linux Ubuntu 12.04. This problem has been encountered on other forums with no solution proposed.

Thanks for any ideas.


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group