retrieving a return code from a thread

Jean-Yves Nief j-y.nief at
Sun Feb 8 16:12:36 CET 2004

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

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

in the main thread:
thrdExample = []
# once it's not active anymore, test of the return code for
thrdExample[i] ??

thanks in advance,

More information about the Python-list mailing list