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

All Samples(1081)  |  Call(1039)  |  Derive(0)  |  Import(42)
_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/pysandbox-HEAD/sandbox/builtins.py   pysandbox(Download)
import __builtin__ as BUILTINS_MODULE
from types import FrameType
from sys import _getframe, version_info
import sys
 
from sandbox import SandboxError, HAVE_CSANDBOX
from .cpython import dictionary_of
            del self.builtin_dict[key]
 
        # Get frame builtins
        self.frame = _getframe(2)
        self.builtins_dict = self.get_frame_builtins(self.frame)
 
        # Get module list

src/f/l/flioops-HEAD/py/trunk/utils/func.py   flioops(Download)
 
 
from inspect import getmembers, getargspec, formatargspec, getargvalues, isclass, getargs
from sys import _getframe
from __builtin__ import min
from itertools import ifilter
from oop.utils.list import unfold_list
		frame object considered.
	"""
	if isinstance(idx, int):
		return _getframe(idx+ 1)
	elif isinstance(idx, str):
		srch= lambda _fo: _fo.f_code.co_name== idx
	elif callable(idx):
		srch= idx
	else:
		raise ValueError, "int or str instance or callable expected but %s found"% (idx,)
	fo= _getframe(1)

src/l/u/ludibrio-HEAD/ludibrio/helpers.py   ludibrio(Download)
#!/usr/bin/env python
#-*- coding:utf-8 -*-
 
from sys import _getframe
import os
 
 
def frame_out_of_context():
    this_frame = frame = _getframe(1)

src/a/p/apresentacoes_pythonbrasil5-HEAD/palestras_relampago/frame_hacks/private.py   apresentacoes_pythonbrasil5(Download)
AttributeError: 'private_method' is a private method
"""
 
from sys import _getframe
from inspect import getframeinfo
 
def private(method):
    def newmethod(self, *args, **kwargs):
        calling_context = _getframe(1)

src/p/y/pysandbox-1.0.3/sandbox/builtins.py   pysandbox(Download)
import __builtin__ as BUILTINS_MODULE
from types import FrameType
from sys import _getframe, version_info
import sys
 
from sandbox import SandboxError, USE_CSANDBOX
from .cpython import dictionary_of
            del self.builtin_dict[key]
 
        # Get frame builtins
        self.frame = _getframe(2)
        self.builtins_dict = self.get_frame_builtins(self.frame)
 
        # Get module list

src/l/u/ludibrio-HEAD/ludibrio/stub.py   ludibrio(Download)
#-*- coding:utf-8 -*-
 
from inspect import getframeinfo
from sys import _getframe as getframe
from _testdouble import _ProxyToAlias
from dependencyinjection import DependencyInjection
from traceroute import TraceRoute
    def _property_called_name(self):
        property_called_name =  self.__last_property_called__ or getframeinfo(getframe(2))[2]
        self.__last_property_called__ = None
        return property_called_name
 
    def _property_called(self, property, args=[], kargs={}, response=None):
        if self.__recording__:

src/l/u/ludibrio-HEAD/ludibrio/mock.py   ludibrio(Download)
#-*- coding:utf-8 -*-
 
from inspect import getframeinfo 
from sys import _getframe as getframe 
from _testdouble import _ProxyToAlias
from dependencyinjection import DependencyInjection
from traceroute import TraceRoute
    def __methodCalled__(self, *args, **kargs):
        property = getframeinfo(getframe(1))[2]
        return self._property_called(property, args, kargs)
 
    def _property_called(self, property, args=[], kargs={}):
        if self.__recording__:
            self.__traceroute_expected__.remember()

src/l/u/ludibrio-3.0.3/ludibrio/helpers.py   ludibrio(Download)
#!/usr/bin/env python
#-*- coding:utf-8 -*-
 
from sys import _getframe
import os
 
 
def frame_out_of_context():
    this_frame = frame = _getframe(1)

src/s/c/ScopeFormatter-1.0.3/scopeformatter.py   ScopeFormatter(Download)
"""Format a string using names in the current scope."""
 
from sys import _getframe
 
def F(*args, **kwds):
    """
    Format a string using names in the caller's scope.
    """
    if not args:
        raise TypeError('F() takes at least 1 argument (0 given)')
    caller = _getframe(1)
    names = {}
    names.update(caller.f_globals)
    names.update(caller.f_locals)

src/l/u/ludibrio-3.0.3/ludibrio/stub.py   ludibrio(Download)
#-*- coding:utf-8 -*-
 
from inspect import getframeinfo
from sys import _getframe as getframe
from _testdouble import _ProxyToAlias
from dependencyinjection import DependencyInjection
from traceroute import TraceRoute
    def _property_called_name(self):
        property_called_name =  self.__last_property_called__ or getframeinfo(getframe(2))[2]
        self.__last_property_called__ = None
        return property_called_name
 
    def _property_called(self, property, args=[], kargs={}, response=None):
        if self.__recording__:

  1 | 2 | 3 | 4  Next