By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,100 Members | 2,846 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,100 IT Pros & Developers. It's quick & easy.

retrieving the return code from a spawned thread.

P: n/a
JY
hi all,

I would like to know how I can retrieve in my main thread (see
[A]) the
return code from a thread (see [b]) that I launched :

[b]
class example(threading.Thread):

def __init__(self, filename):
self.filename = filename
threading.Thread.__init__(self)
self.start()

def run(self):
........
rc = os.system("command example")

[A] in the main thread:
......
thrdExample = []
thrdExample.append(example(file))
......

once thrdExample[i] is not active anymore, how can I test its return
code "rc" if the main thread ??

thanks in advance,
JY
Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.