title: Python exception: how to print the last ten lines of stack trace?
body: <p>In Python as many other languages, the default behavior of an uncaught exception is to print a full stack trace. This is useful except that hundreds of lines of stack trace obscure previous console output with data most of which is uninformative. I really just want to see maybe the last ten lines of the stack trace.</p>
  
  <p>What code can go into an exception handler to print a stack trace just the way it would happen with an uncaught exception, except only print the last ten lines?</p>