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

All Samples(395)  |  Call(378)  |  Derive(0)  |  Import(17)
Return a list of records for the stack above the caller's frame.

        def stack(context=1):
    """Return a list of records for the stack above the caller's frame."""
    return getouterframes(sys._getframe(1), context)
        


src/t/o/topographica-HEAD/releases/0.9.7/topographica/topo/misc/asizeof.py   topographica(Download)
 
from __future__ import generators  #PYCHOK for yield in Python 2.2
 
from inspect    import isbuiltin, isclass, iscode, isframe, \
                       isfunction, ismethod, ismodule, stack
from math       import log
from os         import linesep
    def _getobjects():
         # modules first, globals and stack
         # (may contain duplicate objects)
        return tuple(_values(sys.modules)) + (
               globals(), stack(sys.getrecursionlimit()))
 
try:  # get 'all' referents of objects
 
    if _opts('-stack'):  # stack examples
        _printf('%sasizeof(%s, limit=%s, code=%s) ... %s', linesep, 'stack(MAX)', 'MAX', False, '')
        asizeof(stack(MAX), limit=MAX, code=False, stats=1)
        _print_functions(stack(MAX), 'stack(MAX)', opt='-stack')
 
    if _opts('-sys'):  # sys.modules examples

src/t/o/topographica-HEAD/topographica/topo/misc/asizeof.py   topographica(Download)
 
from __future__ import generators  #PYCHOK for yield in Python 2.2
 
from inspect    import isbuiltin, isclass, iscode, isframe, \
                       isfunction, ismethod, ismodule, stack
from math       import log
from os         import linesep
    def _getobjects():
         # modules first, globals and stack
         # (may contain duplicate objects)
        return tuple(_values(sys.modules)) + (
               globals(), stack(sys.getrecursionlimit()))
 
try:  # get 'all' referents of objects
 
    if _opts('-stack'):  # stack examples
        _printf('%sasizeof(%s, limit=%s, code=%s) ... %s', linesep, 'stack(MAX)', 'MAX', False, '')
        asizeof(stack(MAX), limit=MAX, code=False, stats=1)
        _print_functions(stack(MAX), 'stack(MAX)', opt='-stack')
 
    if _opts('-sys'):  # sys.modules examples

src/p/y/Pympler-0.1/pympler/asizeof/asizeof.py   Pympler(Download)
 
from __future__ import generators  #PYCHOK for yield in Python 2.2
 
from inspect    import isbuiltin, isclass, iscode, isframe, \
                       isfunction, ismethod, ismodule, stack
from math       import log
from os         import linesep
         # ... modules first, globals and stack
         # (may contain duplicate objects)
        t = tuple(_values(sys.modules)) + (
            globals(), stack(sys.getrecursionlimit()))
    else:
        raise ValueError('invalid option: %s=%r' % ('all', all))
    return t, opts  #PYCHOK OK
 
    if _opts('-stack'):  # stack examples
        _printf('%sasizeof(%s, limit=%s, code=%s) ... %s', linesep, 'stack(MAX)', 'MAX', False, '')
        asizeof(stack(MAX), limit=MAX, code=False, stats=1)
        _print_functions(stack(MAX), 'stack(MAX)', opt='-stack')
 
    if _opts('-sys'):  # sys.modules examples

src/t/o/topographica-0.9.7/topo/misc/asizeof.py   topographica(Download)
 
from __future__ import generators  #PYCHOK for yield in Python 2.2
 
from inspect    import isbuiltin, isclass, iscode, isframe, \
                       isfunction, ismethod, ismodule, stack
from math       import log
from os         import linesep
    def _getobjects():
         # modules first, globals and stack
         # (may contain duplicate objects)
        return tuple(_values(sys.modules)) + (
               globals(), stack(sys.getrecursionlimit()))
 
try:  # get 'all' referents of objects
 
    if _opts('-stack'):  # stack examples
        _printf('%sasizeof(%s, limit=%s, code=%s) ... %s', linesep, 'stack(MAX)', 'MAX', False, '')
        asizeof(stack(MAX), limit=MAX, code=False, stats=1)
        _print_functions(stack(MAX), 'stack(MAX)', opt='-stack')
 
    if _opts('-sys'):  # sys.modules examples

src/e/n/EnthoughtBase-3.0.5/enthought/util/api.py   EnthoughtBase(Download)
def called_from(levels=1, context=1):
    """ Prints the caller's stack info """
    print '***** Deprecated.  Please use enthought.debug.called_from'
    from inspect import stack
    stk = stack(context)
    frame, file_name, line_num, func_name, lines, index = stk[1]
    print "'%s' called from:" % func_name

src/p/y/Pympler-0.1/pympler/heapmonitor/heapmonitor.py   Pympler(Download)
except ImportError: # Python 3.0
    def instancemethod(*args):
        return args[0]
from inspect     import stack, getmembers
from subprocess  import Popen, PIPE
from os          import getpid
 
    def _save_trace(self):
        """
        Save current stack trace as formatted string.
        """
        st = stack()
        try:
            self.trace = []

src/h/i/hitchhiker-HEAD/gargleblaster/support/util.py   hitchhiker(Download)
 
from inspect import getargspec, stack
from re import compile as regexp
from struct import unpack
from uuid import uuid4
 
from django.conf import settings
def trace_stack( indent = '' ):
    """Traces the stack at the current source line."""
 
    lines = []
    for frame, filename, lineno, context, source, pos in reversed( stack()[ 1: ] ):
        lines.append( '%sfile "%s", line %d, in %s' % ( indent, filename, lineno, context ) )
        if source:

src/o/p/openerp-server-5.0.0-3/bin/tools/misc.py   openerp-server(Download)
 
    """
    import netsvc
    from inspect import stack
    import re
    from pprint import pformat
    st = stack()[1]

src/b/r/brian-HEAD/trunk/brian/clock.py   brian(Download)
__all__ = ['Clock','defaultclock','guess_clock','define_default_clock','reinit_default_clock','get_default_clock',
           'EventClock']
 
from inspect import stack
from units import *
from globalprefs import *
import magic

src/o/p/openerp-server-5.0.0-3/bin/sql_db.py   openerp-server(Download)
        self.dbname = pool.dbname
 
        if tools.config['log_level'] in (netsvc.LOG_DEBUG, netsvc.LOG_DEBUG_RPC):
            from inspect import stack
            self.__caller = tuple(stack()[2][1:3])
 
    def __del__(self):

  1 | 2  Next