MCPcopy Create free account
hub / github.com/ipython/ipython / do_where

Method do_where

IPython/core/debugger.py:653–669  ·  view source on GitHub ↗

w(here) Print a stack trace, with the most recent frame at the bottom. An arrow indicates the "current frame", which determines the context of most commands. 'bt' is an alias for this command. Take a number as argument as an (optional) number of context line to

(self, arg)

Source from the content-addressed store, hash-verified

651 self.shell.find_line_magic('psource')(arg, namespaces=namespaces)
652
653 def do_where(self, arg):
654 """w(here)
655 Print a stack trace, with the most recent frame at the bottom.
656 An arrow indicates the "current frame", which determines the
657 context of most commands. 'bt' is an alias for this command.
658
659 Take a number as argument as an (optional) number of context line to
660 print"""
661 if arg:
662 try:
663 context = int(arg)
664 except ValueError as err:
665 self.error(err)
666 return
667 self.print_stack_trace(context)
668 else:
669 self.print_stack_trace()
670
671 do_w = do_where
672

Callers

nothing calls this directly

Calls 2

print_stack_traceMethod · 0.95
errorMethod · 0.80

Tested by

no test coverage detected