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: str)
| 1065 | self.shell.find_line_magic("psource")(arg, namespaces=namespaces) |
| 1066 | |
| 1067 | def do_where(self, arg: str): |
| 1068 | """w(here) |
| 1069 | Print a stack trace, with the most recent frame at the bottom. |
| 1070 | An arrow indicates the "current frame", which determines the |
| 1071 | context of most commands. 'bt' is an alias for this command. |
| 1072 | |
| 1073 | Take a number as argument as an (optional) number of context line to |
| 1074 | print""" |
| 1075 | if arg: |
| 1076 | try: |
| 1077 | context = int(arg) |
| 1078 | except ValueError as err: |
| 1079 | self.error(str(err)) |
| 1080 | return |
| 1081 | self.print_stack_trace(context) |
| 1082 | else: |
| 1083 | self.print_stack_trace() |
| 1084 | |
| 1085 | do_w = do_where |
| 1086 |
nothing calls this directly
no test coverage detected