Re: What is wrong with my Python threading?

2008-05-21 Thread Chuckk Hubbard
On Tue, May 20, 2008 at 4:28 PM, castironpi <[EMAIL PROTECTED]> wrote: > On May 20, 8:19 am, "Chuckk Hubbard" <[EMAIL PROTECTED]> > wrote: >> #!/usr/bin/python >> >> #why doesn't this run both threads simultaneously? >> #Thanks for any help. >> #Chuckk >> >> import threading >> import time >> >> de

Re: What is wrong with my Python threading?

2008-05-20 Thread Eduardo O. Padoan
On Tue, May 20, 2008 at 8:24 PM, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Tue, 20 May 2008 10:28:51 -0300, castironpi <[EMAIL PROTECTED]> > escribió: > >> You meant 'thd1.start( )' and 'thd2.start( )'. > > Wow! A message with a high S/N ratio coming from you! > And it's not the first I've

Re: What is wrong with my Python threading?

2008-05-20 Thread Gabriel Genellina
En Tue, 20 May 2008 10:28:51 -0300, castironpi <[EMAIL PROTECTED]> escribió: You meant 'thd1.start( )' and 'thd2.start( )'. Wow! A message with a high S/N ratio coming from you! And it's not the first I've seen - whatever pills you're taking, they're good for you... -- Gabriel Genellina

Re: What is wrong with my Python threading?

2008-05-20 Thread Diez B. Roggisch
Chuckk Hubbard wrote: > #!/usr/bin/python > > #why doesn't this run both threads simultaneously? > #Thanks for any help. > #Chuckk Because you should call thread.start(). Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: What is wrong with my Python threading?

2008-05-20 Thread castironpi
On May 20, 8:19 am, "Chuckk Hubbard" <[EMAIL PROTECTED]> wrote: > #!/usr/bin/python > > #why doesn't this run both threads simultaneously? > #Thanks for any help. > #Chuckk > > import threading > import time > > def printesc(thrd): >     for i in range(10): >         time.sleep(1) >         print t

What is wrong with my Python threading?

2008-05-20 Thread Chuckk Hubbard
#!/usr/bin/python #why doesn't this run both threads simultaneously? #Thanks for any help. #Chuckk import threading import time def printesc(thrd): for i in range(10): time.sleep(1) print thrd, i def master(): thd1 = threading.Thread(target=printesc, args=(1,)) thd2