'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
print'

def do_where(self, arg):

    if arg:
        context = int(arg)
        self.print_stack_trace(context)
    else:
        self.print_stack_trace()
