Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import traceback
- def print_stack_trace():
- try:
- raise Exception
- except Exception:
- with open('~/.my_important_stack_trace', 'w') as file:
- file.write('{}'.format(repr(traceback.format_stack())))
Add Comment
Please, Sign In to add comment