Need Assistance on this program.
vijay swaminathan
swavijay at gmail.com
Thu May 12 05:45:07 EDT 2011
I tried using that as well.
The problem is, the thread becomes dead as soon as it executes the
invocation of command prompt.
I want the thread to be alive till I go and manually close the command
prompt.
-Vijay Swaminathan.
On Thu, May 12, 2011 at 2:46 PM, Andrea Crotti <andrea.crotti.0 at gmail.com>wrote:
> vijay swaminathan <swavijay at gmail.com> writes:
>
> > Hi All,
> >
> > I'm new bie to python thread programming and would like to assistance
> > on the attached code.
> >
> > In this, I'm calling a thread to invoke a command prompt and would
> > like to print the "Thread as alive" as long as the command prompt is
> > opened and would like to print "Thread is Dead" only when the command
> > prompt is closed by the user.
> >
> > based on my understand I have written this peace of code which does
> > not seem to work. There is some flaw in the logic which I could not
> > understand since I'm not that familiar with the thread concepts.
> >
> > Can somebody help me in getting this piece of code working.
> >
> > Also can somebody point me to a good tutorial on understanding python
> > thread programming since I want to get my understanding on the concept
> > of thread better. I googled a few but quite confusing.
> >
> > --
> > Vijay Swaminathan
>
> Easy mistake, this:
> if mythread_object.is_alive:
>
> is wrong, since is_alive is a method, not a bool so it should be
> is_alive().
>
> Pay attention to these things, and actually something called
> "is_adjective" is almost never a variable.
>
--
Vijay Swaminathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110512/f0868044/attachment-0001.html>
More information about the Python-list
mailing list