Re: [Tutor] Waiting until a thread ends

2011-03-19 Thread lists
> > > >> In my continuing quest the find the best way of doing this I came across >> the following method: >> >> for thread in threading.enumerate(): >> if thread is not threading.currentThread(): >> thread.join() >> print 'FINISHED' >> >> In my newbie understanding, you

Re: [Tutor] Waiting until a thread ends

2011-03-19 Thread lists
> > >> Only really glanced at this, but you seem to be checking only the last >>> thread *after* the loop? Surely you should be storing all the threads in a >>> list (or someplace) as you create them, and then check them all for liveness >>> and if so join them each in turn, to ensure you only pri

Re: [Tutor] Waiting until a thread ends

2011-03-17 Thread lists
> Only really glanced at this, but you seem to be checking only the last >> thread *after* the loop? Surely you should be storing all the threads in a >> list (or someplace) as you create them, and then check them all for liveness >> and if so join them each in turn, to ensure you only print 'FINI

Re: [Tutor] Waiting until a thread ends

2011-03-17 Thread lists
> > Only really glanced at this, but you seem to be checking only the last > thread *after* the loop? Surely you should be storing all the threads in a > list (or someplace) as you create them, and then check them all for liveness > and if so join them each in turn, to ensure you only print 'FINIS

[Tutor] Waiting until a thread ends

2011-03-17 Thread lists
Hi tutors! I'm not a hard-core programmer but have used Python in systems administration (it makes sense to me to use a scripting language which supports both Windows and Unix). The code below is an excerpt from a module I have written to collect information about hosts on my network and populate