All Samples(273) | Call(251) | Derive(0) | Import(22)
_getframe([depth]) -> frameobject Return a frame object from the call stack. If optional integer depth is given, return the frame object that many calls below the top of the stack. If that is deeper than the call stack, ValueError is raised. The default for depth is zero, returning the frame at the top of the call stack. This function should be used for internal and specialized purposes only.
src/p/y/pyClanSphere-HEAD/pyClanSphere/utils/log.py pyClanSphere(Download)
import sys from os import path from datetime import datetime from inspect import currentframe from warnings import warn from traceback import print_exception, format_exception
% message), stacklevel=2)
return
if level >= logger.level:
logger.log(name, message, module, currentframe(1))
log.__name__ = name
return log
message = (message and message + '\n' or '') + \
''.join(format_exception(*exc_info)) \
.decode('utf-8', 'ignore')
logger.log('error', message, module, currentframe(1))
# make a bunch of loggers
src/c/o/collective.indexing-1.8/src/collective/indexing/utils.py collective.indexing(Download)
from logging import getLogger, DEBUG from inspect import currentframe from zope.component import queryUtility, getUtilitiesFor from collective.indexing.interfaces import IIndexing from collective.indexing.interfaces import IIndexingConfig from collective.indexing.queue import getQueue from collective.indexing.queue import processQueue
def framespec(depth=1):
""" formet the module, name & line for the frame at the given depth """
frame = currentframe(depth)
get = frame.f_globals.get
name = get('__name__') or get('test') or get('__file__') or '?'
line = frame.f_lineno
func = frame.f_code.co_name
src/k/s/kss.core-1.6.0/kss/core/actionwrapper.py kss.core(Download)
# 02111-1307, USA.
from textwrap import dedent
from inspect import formatargspec, getargspec, getargvalues, \
formatargvalues, currentframe
from zope.interface import implements
src/h/a/harpy-HEAD/src/MidiToText.py harpy(Download)
# -*- coding: utf-8 -*- from inspect import currentframe, getargspec, getargvalues from MidiOutStream import MidiOutStream
src/n/o/NonMockObjects-0.2.1/src/nonmockobjects.py NonMockObjects(Download)
# will take their first 'default' choice.)"
from types import StringTypes
from inspect import currentframe, getargvalues
__all__ = ['use_prefix', 'Objects', 'register_as', 'register',
'call_protect', 'all_args', 'Choose', 'ChooseArgs']
def all_args(*exclude):
"""This gets all the local args of the calling stack frame, but
filters out the Object instance parameter."""
try:
frame = currentframe()
caller_frame = frame.f_back
src/p/f/pfh-HEAD/pfh.py pfh(Download)
from inspect import getframeinfo, currentframe from types import TupleType, ListType from sys import _getframe #begin library code.
src/m/e/meresco-HEAD/meresco/bugfixes/version_2.13.x/meresco/framework/observable.py meresco(Download)
## end license ##
from sys import exc_info
from weightless import compose
from inspect import currentframe
class Defer(object):
def __init__(self, observers, defereeType):
src/p/l/plone.app.folder-1.0.2/src/plone/app/folder/nogopip.py plone.app.folder(Download)
from logging import getLogger from inspect import currentframe from zope.interface import implements from zope.component import getUtility from Acquisition import aq_base from App.special_dtml import DTMLFile from OFS.SimpleItem import SimpleItem
src/i/n/Interface-2.11.1/src/Interface/_InterfaceClass.py Interface(Download)
$Id: _InterfaceClass.py 40218 2005-11-18 14:39:19Z andreasjung $ """ from inspect import currentframe import sys from Method import Method, fromFunction from Attribute import Attribute
src/w/e/weightless-HEAD/weightless/_observable.py weightless(Download)
return component
from inspect import currentframe
class Context(object):
1 | 2 | 3 Next