Did I find the right examples for you? yes no

All Samples(251)  |  Call(231)  |  Derive(0)  |  Import(20)
Get a list of records for a frame and all higher (calling) frames.

Each record contains a frame object, filename, line number, function
name, a list of lines of context, and index within the context.

        def getouterframes(frame, context=1):
    """Get a list of records for a frame and all higher (calling) frames.

    Each record contains a frame object, filename, line number, function
    name, a list of lines of context, and index within the context."""
    framelist = []
    while frame:
        framelist.append((frame,) + getframeinfo(frame, context))
        frame = frame.f_back
    return framelist
        


src/e/c/ecell3-HEAD/samples/ga/ga.py   ecell3(Download)
        # raise NotImplementedError
        import inspect
        caller = inspect.getouterframes(inspect.currentframe())[0][3]
        raise NotImplementedError(caller + ' must be implemented in subclass')
 

src/a/r/arsenal-1.01/arsenal/debug/utils.py   arsenal(Download)
    hello world
    """
    c_frame = inspect.getouterframes(inspect.currentframe(), 1)[1][0]
    c_args, c_varargs, c_varkw, c_locals = inspect.getargvalues(c_frame)
    d = dict(c_locals)

src/a/e/Aerospace-Simulations-HEAD/morse/src/morse/helpers/components.py   Aerospace-Simulations(Download)
    curframe = inspect.currentframe()
    try:
        calframe = inspect.getouterframes(curframe, 2)
        try:
            cls_locals =  calframe[1][0].f_locals
    curframe = inspect.currentframe()
    try:
        calframe = inspect.getouterframes(curframe, 2)
        try:
            cls_locals =  calframe[1][0].f_locals
    curframe = inspect.currentframe()
    try:
        calframe = inspect.getouterframes(curframe, 2)
        try:
            cls_locals =  calframe[1][0].f_locals

src/a/r/arsenal-HEAD/arsenal/debug/utils.py   arsenal(Download)
    hello world
    """
    c_frame = inspect.getouterframes(inspect.currentframe(), 1)[1][0]
    c_args, c_varargs, c_varkw, c_locals = inspect.getargvalues(c_frame)
    d = dict(c_locals)

src/s/i/sikuli-framework-HEAD/src/entity/entity.py   sikuli-framework(Download)
 
        curframe = inspect.currentframe()
        calframes = inspect.getouterframes(curframe, 1)
 
        # form the stack trace, remove frames that are not entirely important to see in the logs        

src/i/n/inventory-HEAD/mozdns/mozbind/builder.py   inventory(Download)
    def log(self, msg, log_level='LOG_INFO', **kwargs):
        # Eventually log this stuff into bs
        # Let's get the callers name and log that
        curframe = inspect.currentframe()
        calframe = inspect.getouterframes(curframe, 2)

src/m/o/mozilla_inventory-HEAD/mozdns/mozbind/builder.py   mozilla_inventory(Download)
    def log(self, msg, log_level='LOG_INFO', **kwargs):
        # Eventually log this stuff into bs
        # Let's get the callers name and log that
        curframe = inspect.currentframe()
        calframe = inspect.getouterframes(curframe, 2)

src/c/y/cyder-HEAD/cyder/cydns/cybind/builder.py   cyder(Download)
def format_log_message(msg, root_domain=None):
        curframe = inspect.currentframe()
        calframe = inspect.getouterframes(curframe, 2)
 
        frame_number = 2

src/p/y/PyContractor-0.1.1/PyContractor/PyContractor.py   PyContractor(Download)
        if not condition:
            currentFrame = inspect.currentframe()
            currentFrame = inspect.getouterframes(currentFrame, 2)
            self._raiseError(AssertionType, message, currentFrame[1][3])
 

src/s/o/socorro-HEAD/webapp-django/vendor-local/lib/python/raven/contrib/zope/__init__.py   socorro(Download)
#!/usr/bin/python
# -*- coding: utf-8 -*-
 
from inspect import getouterframes, currentframe, getinnerframes
from raven.handlers.logging import SentryHandler
    def emit(self, record):
        if record.levelno <= logging.ERROR:
            request = None
            exc_info = None
            for frame_info in getouterframes(currentframe()):

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