title: How to get stack trace string without raising exception in python?
body: <p><code>traceback.format_exc()</code></p>
  
  <p>can get it with raising an exception.</p>
  
  <p><code>traceback.print_stack()</code></p>
  
  <p>prints the stack without an exception needed, but it does not return a string.</p>
  
  <p>There doesn't seem to be a way to get the stack trace string without raising an exception in python?</p>