[EMAIL PROTECTED] schrieb: > The Python main interpreter has an at-exit list of callables, which > are called when the interpreter exits. Can threads have one? What's > involved, or is the best way merely to subclass Thread?
Is that some sort of trick-question? class MyThread(Thread): def run(self): while some_condition: do_something() do_something_after_the_thread_ends() The atexit stuff is for process-termination which is/may be induced by external signals - which is the reason why these callbacks extist. Threads don't have that, thus no need. Diez -- http://mail.python.org/mailman/listinfo/python-list