need some help with threading module...

chahnaz.ourzikene chahnaz.ourzikene at wanadoo.fr
Mon Dec 27 13:16:00 EST 2004


"M.E.Farmer" <mefjr75 at hotmail.com> a écrit dans le message de news:
1104102769.321923.4140 at z14g2000cwz.googlegroups.com...

> Just a warning!
> Threads and newbies don't mix well,
> many pitfalls and hard to find bugs await you.
> I would avoid using threads if at all possible.

Indeed :). But how will i learn using threads if i avoid using them :) ??

> Now we have all that over lets see some code.
>
> py> import threading
> py> class Test(threading.Thread):
> ...        def run(self):
> ...             x = 0
> ...             while x < 10:
> ...                 print x
> ...                 x += 1
> ...             print " Ending"
> Use it like this:
> py> Test().start()

Your example is interristing...somehow this is not exactly what i want to
realise. I have exposed the problem in an earlier reply...

Thank you all.

Yacine Chaouche -- France.





More information about the Python-list mailing list