470,638 Members | 1,682 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,638 developers. It's quick & easy.

Wrapping functions in modules or packages.

I'm writing some utilty functions for use with gtk. But
in order to use them correctly I have to know whether
they are called in the gtk-thread or an other.

So my idea was to wrap the gtk.main function so that
it would registrate the thread_id that called it.

So I was thinking about doing something like the
import gtk

import thread

_gtkmain = gtk.main
def main():

global _gtkthread

_gtk_thread = thread.get_ident()
gtk.main = main
Is this acceptable? Are there better ways to do things like
Jul 18 '05 #1
0 792

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Nick Coghlan | last post: by
15 posts views Thread by Nick Coghlan | last post: by
4 posts views Thread by Fabian Braennstroem | last post: by
5 posts views Thread by John Ladasky | last post: by
1 post views Thread by Stoney L | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.