Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 def do_savestack(self, path):
     if 'stack' in self.__dict__:
         # when we're saving we always
         # start from the top
         frame = self.stack[-1][0]
     else:
         frame = sys._getframe(1)
         while frame.f_globals['__name__'] in ('epdb', 'pdb', 'bdb', 'cmd'):
             frame = frame.f_back
     if path == "":
         (tbfd, path) = tempfile.mkstemp('', 'conary-stack-')
         output = os.fdopen(tbfd, 'w')
     else:
         output = open(path, 'w')
     epdb_stackutil.printStack(frame, output)
     print "Stack saved to %s" % path
Пример #4
0
 def do_savestack(self, path):
     if 'stack' in self.__dict__:
         # when we're saving we always 
         # start from the top
         frame = self.stack[-1][0]
     else:
         frame = sys._getframe(1)
         while frame.f_globals['__name__'] in ('epdb', 'pdb', 'bdb', 'cmd'):
             frame = frame.f_back
     if path == "":
         (tbfd,path) = tempfile.mkstemp('', 'conary-stack-')
         output = os.fdopen(tbfd, 'w')
     else:
         output = open(path, 'w')
     epdb_stackutil.printStack(frame, output)
     print "Stack saved to %s" % path