title: How can I catch any output to the console from a Python Tkinter application?
body: <p>I have a large, multifile, Tkinter app with innumerable functions, that is then being packaged with Pyinstaller as an executable.</p>
  
  <p>It contains error handling for expected events. However, it does not have any error handling for unexpected events. When running the application before packaging it as an executable, unexpected errors are printed to the console. Once it is packaged as an executable, these errors are hidden (I do not want a terminal window to display to the user).</p>
  
  <p>The problem with this is that unexpected errors are not displayed anywhere, and therefore I cannot capture and debug them.</p>
  
  <p>How can I have a "catch-all" that grabs any output that would go to the console, or catch or log any error? I know many ways to do this with extra code throughout, but adding code to each function of the application seems overly burdensome for what I'm trying to achieve.</p>