Guest User

Untitled

a guest
Dec 10th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. import traceback
  2.  
  3.  
  4. def print_stack_trace():
  5. try:
  6. raise Exception
  7. except Exception:
  8. with open('~/.my_important_stack_trace', 'w') as file:
  9. file.write('{}'.format(repr(traceback.format_stack())))
Add Comment
Please, Sign In to add comment