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 a return code from a 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="Jean-Yves Nief, post: 1749572"] hi all, I would like to know how I can retrieve in my main program the return code from a thread that I launched: 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") in the main thread: ...... thrdExample = [] thrdExample.append(example(file)) ...... # once it's not active anymore, test of the return code for thrdExample[i] ?? thanks in advance, JY[/i] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
retrieving a return code from a thread
Top