title: Python: how can I handle any unhandled exception in an alternative way?
body: <p>Normally unhandled exceptions go to the stdout (or stderr?), I am building an app where I want to pass this info to the GUI before shutting down and display it to the user and, at the same time I want to write it to a log file. So, I need an str with the full text of the exception.</p>
  
  <p>How can I do this?</p>