def do_printstack(self, arg):
        if 'stack' in self.__dict__:
            # print only the stack up to our current depth
            frame = self.stack[-1][0]
        else:
            frame = sys._getframe(1)
            while frame.f_globals['__name__'] in ('epdb', 'pdb', 'bdb', 'cmd'):
                frame = frame.f_back
        epdb_stackutil.printStack(frame, sys.stderr)
dataset/ETHPy150Open sassoftware/conary/conary/lib/epdb_embedded/__init__.py/Epdb.do_printstack/original