Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
retrieving the return code from a spawned thread.
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="JY, post: 1751561"] 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[/i][/B][/B] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
retrieving the return code from a spawned thread.
Top