Just to narrow it down a bit, it's the
gtk.gdk.Display(os.environ["DISPLAY"]) call that causes the problem.

Anyone with an idea?


On Thu, 29 Apr 2004 13:21:44 +1000
Bob Hepple <[EMAIL PROTECTED]> wrote:

> I'm trying to copy the PRIMARY clipboard into my textBuffer - so naturally
> I need to do something like this:
> 
> display = gtk.gdk.Display(os.environ["DISPLAY"])
> if display:
>       clip = gtk.Clipboard(display, "PRIMARY")
>       if clip:
>               self.textBuffer.paste_clipboard(clip, 
> self.textBuffer.get_iter_at_mark(self.textBuffer.get_insert()), 1)
> 
>               # The following exhibits the same problem
>               #text = clip.wait_for_text()
>               #if text and len(text):
>               #       self.textBuffer.insert_at_cursor(text, len(text))
> 
> ... however, when I do this I get a segmentation fault when I (eventually)
> exit - not immediately, so I would guess it's in the cleanup code
> soemwhere.
> 
> I'm using:
>       pygtk-2.2.0
>       gtk+-2.2.4-r1
>       libglade-2.0.1
>       gnome-python-2.0.0-r1
>       pyorbit-2.0.0
> 
> on gentoo, kernel 2.6.3
> 
> Any ideas? Something I need to clean up?
> 
> 
> Thanks
> 
> -- 
> Bob Hepple
> mailto:[EMAIL PROTECTED] http://bhepple.freeshell.org
> Public Key: http://bhepple.freeshell.org/public_keys.txt
> 


-- 
Bob Hepple
mailto:[EMAIL PROTECTED] http://bhepple.freeshell.org
Public Key: http://bhepple.freeshell.org/public_keys.txt

Attachment: pgp6l4DguqoxP.pgp
Description: PGP signature

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to