How to find exit code or reason when atexit callback is called in Python? How to find exit code or reason when atexit callback is called in Python? python python