[pygtk] Need some help with thread
nephish
nephish at xit.net
Thu Sep 8 04:08:09 WST 2005
Sebastian "Marduk" Pölsterl wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>nephish schrieb:
>
>
>>OK
>>i looked at the docs in the link.
>>does this mean i set up every thread (i need to run four) as its own
>>subclass of threading.thread?
>>and call it like that?
>>
>>
>Exactly.
>You write your class:
>class MyThread(threading.Thread):
> def __init__(self):
> threading.Thread.__init__(self)
> def run(self):
> # Your process running as thread
>
>and then call:
>mythread = MyThread()
>mythread.start()
>
>with mythread.isAlive() you can check if your thread is finished
>
>
>
>>the examples i have seen so far just set it as a function and then call
>>the function with threading.Thread.start(function())
>>maybe i am missing something in the terminology.
>>thanks for the reply by the way.
>>
>>
>>
>I only know this procedure from Thread.start_new_thread()
>See http://docs.python.org/lib/module-thread.html for more detail.
>
>- --
>Greetings,
>Sebastian Pölsterl
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.2.5 (GNU/Linux)
>Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
>iD8DBQFDHxNq1ygZeJ3lLIcRAtwHAKCQWVFP9rhyhA/8HBQo8k2REcEvAgCeOFn0
>ue3aHcmBvP54QeA0orim3Hg=
>=Wd6V
>-----END PGP SIGNATURE-----
>_______________________________________________
>pygtk mailing list pygtk at daa.com.au
>http://www.daa.com.au/mailman/listinfo/pygtk
>Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>
>
>
I Finally Got it working !!
thanks so much for all of your help.
really, could'nt have gotten this far without it,
(or this mailing list)
thanks again
shawn
More information about the pygtk
mailing list