Help calling class from a class above.
Posted
by wtzolt
on Stack Overflow
See other posts from Stack Overflow
or by wtzolt
Published on 2010-04-12T21:03:02Z
Indexed on
2010/04/13
6:33 UTC
Read the original article
Hit count: 291
python
Hello,
How to call from class oneThread: back to class fun:? As in, address a class written below. Is it possible?
class oneThread(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.start()
def run(self):
print "1"
time.sleep(1)
print "2"
time.sleep(1)
print "3"
self.wTree.get_widget("entryResult").set_text("Done with One.") # How to call from here back to class fun, which of course is below...?
class fun:
wTree = None
def __init__( self ):
self.wTree = gtk.glade.XML( "main.glade" )
self.wTree.signal_autoconnect( {"on_buttonOne" : self.one} )
gtk.main()
def one(self, widget):
oneThread();
gtk.gdk.threads_init()
do=fun()
© Stack Overflow or respective owner