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

All Samples(323)  |  Call(283)  |  Derive(0)  |  Import(40)
Extract the raw traceback from the current stack frame.

The return value has the same format as for extract_tb().  The
optional 'f' and 'limit' arguments have the same meaning as for
print_stack().  Each item in the list is a quadruple (filename,
line number, function name, text), and the entries are in order
from oldest to newest stack frame.

        def extract_stack(f=None, limit = None):
    """Extract the raw traceback from the current stack frame.

    The return value has the same format as for extract_tb().  The
    optional 'f' and 'limit' arguments have the same meaning as for
    print_stack().  Each item in the list is a quadruple (filename,
    line number, function name, text), and the entries are in order
    from oldest to newest stack frame.
    """
    if f is None:
        try:
            raise ZeroDivisionError
        except ZeroDivisionError:
            f = sys.exc_info()[2].tb_frame.f_back
    if limit is None:
        if hasattr(sys, 'tracebacklimit'):
            limit = sys.tracebacklimit
    list = []
    n = 0
    while f is not None and (limit is None or n < limit):
        lineno = f.f_lineno
        co = f.f_code
        filename = co.co_filename
        name = co.co_name
        linecache.checkcache(filename)
        line = linecache.getline(filename, lineno, f.f_globals)
        if line: line = line.strip()
        else: line = None
        list.append((filename, lineno, name, line))
        f = f.f_back
        n = n+1
    list.reverse()
    return list
        


src/s/q/sqmediumlite-1.7.1/_sqmediumlite/__init__.py   sqmediumlite(Download)
def log (*args):
    global logname, logtick, logthr
    if logname is None:
        global extract_stack, asctime, strftime, time
        from traceback import extract_stack
        from time import asctime, strftime, time
    tick = ("%.3f" % time ()) [-4:]
        nr = logthr = logthr + 1
        threads [ref (currentThread(), thrfinished)] = nr
    pid = "%2i%2s" % (getpid () % 100, i_abc (nr))
    caller = extract_stack (limit = 2) [-2]
    source = basename (caller [0]) [:-3]
    line = caller [1]
    if logname is None:

src/e/v/eventghost-HEAD/trunk/eg/Classes/ThreadWorker.py   eventghost(Download)
import eg
from sys import exc_info, _getframe
from threading import Event, Thread
from traceback import extract_stack, format_list
from functools import partial
from collections import deque
from time import clock
                "Unhandled exception in WorkerThread <%s>:\n" % self.__thread.getName(),
                "Callers stack:\n"
            ]
            lines += format_list(extract_stack(action.callersFrame))
            eg.PrintError("".join(lines).rstrip())
            eg.PrintTraceback()
        finally:

src/e/v/eventghost-HEAD/eg/Classes/ThreadWorker.py   eventghost(Download)
import eg
from sys import exc_info, _getframe
from threading import Event, Thread
from traceback import extract_stack, format_list
from functools import partial
from collections import deque
from time import clock
                "Unhandled exception in WorkerThread <%s>:\n" % self.__thread.getName(),
                "Callers stack:\n"
            ]
            lines += format_list(extract_stack(action.callersFrame))
            eg.PrintError("".join(lines).rstrip())
            eg.PrintTraceback()
        finally:

src/o/r/orcatorrent-HEAD/Core/BitTornado/BT1/Encrypter.py   orcatorrent(Download)
from sets import Set
 
# 2fastbt_
from traceback import print_exc, extract_stack, print_stack
import sys
from Tribler.Core.Overlay.SecureOverlay import SecureOverlay
from Tribler.Core.BitTornado.BT1.MessageID import protocol_name,option_pattern

src/s/i/sippy-HEAD/sippy/Timeout.py   sippy(Download)
 
from datetime import datetime
from twisted.internet import task, reactor
from traceback import print_exc, format_list, extract_stack
from sys import stdout
 
class Timeout(object):
    def __init__(self, *parameters, **kparameters):
        self._traceback = format_list(extract_stack())
        Timeout.__init__(self, *parameters, **kparameters)
 
    def cancel(self):
        if self._task == None:
            print self._traceback

src/d/r/dramatis-0.1.1/lib/dramatis/error/__init__.py   dramatis(Download)
from sys import exc_info
 
from traceback import extract_tb
from traceback import extract_stack
from traceback import format_list
 
class Error(Exception):
            # warning( "none" )
            # warning( "".join( format_list(extract_stack())) )
            # warning( "none done")
            self._raw_traceback = extract_stack() + self._raw_traceback
 
        array = list(self._raw_traceback)
        array.reverse()

src/o/r/orcatorrent-HEAD/Core/CacheDB/SqliteSeedingStatsCacheDB.py   orcatorrent(Download)
import math
from random import shuffle
import threading
from traceback import print_exc, extract_stack, print_stack
 
from Tribler.__init__ import LIBRARYNAME
from Tribler.Core.CacheDB.sqlitecachedb import *

src/o/r/orcatorrent-HEAD/Core/CacheDB/sqlitecachedb.py   orcatorrent(Download)
import math
from random import shuffle
import threading
from traceback import print_exc, extract_stack, print_stack
 
from Tribler.__init__ import LIBRARYNAME
 

src/o/r/orcatorrent-HEAD/Core/CacheDB/SqliteFriendshipStatsCacheDB.py   orcatorrent(Download)
import math
from random import shuffle
import threading
from traceback import print_exc, extract_stack, print_stack
 
from Tribler.__init__ import LIBRARYNAME
from Tribler.Core.CacheDB.sqlitecachedb import *

src/a/u/audiere-HEAD/trunk/audiere/third-party/scons-local-1.2.0/SCons/Node/FS.py   audiere(Download)
    `targets` can be a single Node object or filename, or a sequence
    of Nodes/filenames.
    """
    from traceback import extract_stack
 
    # First check if the cache really needs to be flushed. Only
    # actions run in the SConscript with Execute() seem to be
    # affected. XXX The way to check if Execute() is in the stacktrace
    # is a very dirty hack and should be replaced by a more sensible
    # solution.
    for f in extract_stack():

  1 | 2 | 3 | 4  Next