import traceback traceback.print_stack()