Hello friends!
Everytime a check any program that use gtk threading i see the use of
gobject threads init, locks, though threading.Thread before the gtk.main()
But my doubt is: Why i never see the inverse?
Why not put the gtk.main() inside a threading.Thread e do anything before
this?
I just want to know what are the problems when using it.
I the code below i demonstrate better what i want to say:
import gtk,sys
import threading
class GUI(threading.Thread):
def __init__(self):
threading.Thread.__init_ _(self)
self.gui=gtk
def run(self):
self.gui.main()
def quit(widget)
sys.exit(0)
win=gtk.Window()
win.set_default_size(200,200)
win.connect('destroy',sair)
text=gtk.Label(HELLO WORLD)
text.show()
win.add(texto)
win.show ()
#Starting the mainloop inside a thread
GUI().start()
text.set_markup(span size=\13000\HELLO THREADS!/span)
Então, por que não usar assim?
--
:wq
Atenciosamente
__
Gabriel Falcão
Não há um caminho para o Linux, Linux é o caminho!
Jabber: [EMAIL PROTECTED]
Blog: http://www.nacaolivre.org
GPG public key: http://www.nacaolivre.org/gabrielteratos.gpg
-BEGIN GEEK CODE BLOCK-
Version: 3.12
GCA d-- s++: a--- C UL++ P+ L E- W++ N* o-- K- w---
O-- M+ V- PS+ PE++ Y+++ PGP++ t+ 5 X R+ tv-- b- DI-- D+++
G++ e+ h! r+++ y++
--END GEEK CODE BLOCK--
--
:wq
Atenciosamente
__
Gabriel Falcão
Não há um caminho para o Linux, Linux é o caminho!
Jabber: [EMAIL PROTECTED]
Blog: http://www.nacaolivre.org
GPG public key: http://www.nacaolivre.org/gabrielteratos.gpg
-BEGIN GEEK CODE BLOCK-
Version: 3.12
GCA d-- s++: a--- C UL++ P+ L E- W++ N* o-- K- w---
O-- M+ V- PS+ PE++ Y+++ PGP++ t+ 5 X R+ tv-- b- DI-- D+++
G++ e+ h! r+++ y++
--END GEEK CODE BLOCK--
___
pygtk mailing list pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/