Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #5222 > unrolled thread

Re: Need Assistance on this program.

Started byAndrea Crotti <andrea.crotti.0@gmail.com>
First post2011-05-12 11:16 +0200
Last post2011-05-12 11:16 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Need Assistance on this program. Andrea Crotti <andrea.crotti.0@gmail.com> - 2011-05-12 11:16 +0200

#5222 — Re: Need Assistance on this program.

FromAndrea Crotti <andrea.crotti.0@gmail.com>
Date2011-05-12 11:16 +0200
SubjectRe: Need Assistance on this program.
Message-ID<mailman.1456.1305193605.9059.python-list@python.org>
vijay swaminathan <swavijay@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.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web