question about ctrl-d and atexit with threads

Darren Dale dsdale24 at
Thu Mar 5 18:26:18 CET 2009

On Mar 5, 12:02 pm, s... at wrote:
> What happens if you simply call
>     my_thread.setDaemon(True)
> (or in Python 2.6):
>     my_thread.daemon = True
> ?  That is the documented way to exit worker threads when you want the
> application to exit.  From the threading module docs:
>     "The entire Python program exits when no alive non-daemon threads are
>     left."

Thank you Skip, that solves the problem. I'm still curious what the
difference is between python's handling of sys.exit and EOF, but its
academic at this point.

Thanks again,

More information about the Python-list mailing list