• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(298)  |  Call(239)  |  Derive(0)  |  Import(59)
Print up to 'limit' stack trace entries from the traceback 'tb'.

If 'limit' is omitted or None, all entries are printed.  If 'file'
is omitted or None, the output goes to sys.stderr; otherwise
'file' should be an open file or file-like object with a write()
method.

        def print_tb(tb, limit=None, file=None):
    """Print up to 'limit' stack trace entries from the traceback 'tb'.

    If 'limit' is omitted or None, all entries are printed.  If 'file'
    is omitted or None, the output goes to sys.stderr; otherwise
    'file' should be an open file or file-like object with a write()
    method.
    """
    if file is None:
        file = sys.stderr
    if limit is None:
        if hasattr(sys, 'tracebacklimit'):
            limit = sys.tracebacklimit
    n = 0
    while tb is not None and (limit is None or n < limit):
        f = tb.tb_frame
        lineno = tb.tb_lineno
        co = f.f_code
        filename = co.co_filename
        name = co.co_name
        _print(file,
               '  File "%s", line %d, in %s' % (filename, lineno, name))
        linecache.checkcache(filename)
        line = linecache.getline(filename, lineno, f.f_globals)
        if line: _print(file, '    ' + line.strip())
        tb = tb.tb_next
        n = n+1
        


src/d/j/django-navbar-0.3.0/examples/dbgp/client.py   django-navbar(Download)
    if n < 1:
        # exception happened in dbgp, and there are no stacks for the user, lets just
        # do a regular print_tb
        traceback.print_tb(orig_tb, limit, file)
 
def _print_exception(etype, value, tb, limit=None, file=None):
    """Print exception up to 'limit' stack trace entries from 'tb' to 'file'.

src/t/u/tundra-HEAD/lemmy/src/pgu/examples/gui17.py   tundra(Download)
        except: 
            e_type,e_value,e_traceback = sys.exc_info()
            print 'Traceback (most recent call last):'
            traceback.print_tb(e_traceback,None,s)
            print e_type,e_value
 
        sys.stdout = _stdout

src/p/y/pydra-HEAD/pydra/cluster/controller/web/interface.py   pydra(Download)
                chaff, chaff, tb = sys.exc_info()
 
                buf = StringIO.StringIO()
                traceback.print_tb(tb, limit=10, file=buf)
                traces = buf.getvalue()
                buf.close()
 

src/p/y/pydra-HEAD/pydra/cluster/controller/amf/interface.py   pydra(Download)
                except Exception, e:                    
                    import traceback
                    exceptionType, exceptionValue, exceptionTraceback = sys.exc_info()
                    traceback.print_tb(exceptionTraceback, limit=10, file=sys.stdout)
                    logger.error('AMFFunction - exception in mapped function [%s] %s' % (self.function, e))
                    raise e
 

src/b/o/boodler-HEAD/core/branch/rel_2_0_2/script/boodler.py   boodler(Download)
                limit = None
 
        fl = StringIO.StringIO()
        traceback.print_tb(tup[2], limit=limit, file=fl)
        res = fl.getvalue()
        fl.close()
        fl = None

src/b/o/boodler-HEAD/core/branch/rel_2_0_1/script/boodler.py   boodler(Download)
                limit = None
 
        fl = StringIO.StringIO()
        traceback.print_tb(tup[2], limit=limit, file=fl)
        res = fl.getvalue()
        fl.close()
        fl = None

src/b/o/boodler-HEAD/core/branch/rel_2_0_0/script/boodler.py   boodler(Download)
                limit = None
 
        fl = StringIO.StringIO()
        traceback.print_tb(tup[2], limit=limit, file=fl)
        res = fl.getvalue()
        fl.close()
        fl = None

src/p/y/pydra-HEAD/pydra/cluster/module/module_manager.py   pydra(Download)
                import traceback, sys
                print e
                type, value, traceback_ = sys.exc_info()
                traceback.print_tb(traceback_, limit=10, file=sys.stdout)
 
        # adding friends
        for module in self._modules:

src/b/o/boodler-HEAD/core/trunk/script/boodler.py   boodler(Download)
                limit = None
 
        fl = StringIO.StringIO()
        traceback.print_tb(tup[2], limit=limit, file=fl)
        res = fl.getvalue()
        fl.close()
        fl = None

src/b/o/Boodler-2.0.3/script/boodler.py   Boodler(Download)
                limit = None
 
        fl = StringIO.StringIO()
        traceback.print_tb(tup[2], limit=limit, file=fl)
        res = fl.getvalue()
        fl.close()
        fl = None

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next