Did I find the right examples for you? yes no

All Samples(23)  |  Call(23)  |  Derive(0)  |  Import(0)
Get the line number from a frame object, allowing for optimization.

        def getlineno(frame):
    """Get the line number from a frame object, allowing for optimization."""
    # FrameType.f_lineno is now a descriptor that grovels co_lnotab
    return frame.f_lineno
        


src/p/y/pydbgr-0.2.6/pydbgr/processor/cmdproc.py   pydbgr(Download)
        if self.curframe:
            self.list_lineno = \
                max(1, inspect.getlineno(self.curframe) \
                        - int(self.settings('listsize') / 2)) - 1
        else:

src/t/r/trepan-0.2.8/trepan/processor/cmdproc.py   trepan(Download)
        if self.curframe:
            self.list_lineno = \
                max(1, inspect.getlineno(self.curframe) \
                        - int(self.settings('listsize') / 2)) - 1
        else:

src/a/n/antisocial-HEAD/ve/lib/python2.7/site-packages/sure/core.py   antisocial(Download)
def _get_line_number(func):
    try:
        return inspect.getlineno(func)
    except AttributeError:
        return get_function_code(func).co_firstlineno

src/p/y/pydbgr-0.2.6/pydbgr/bwprocessor/main.py   pydbgr(Download)
        if self.curframe:
            self.list_lineno = \
                max(1, inspect.getlineno(self.curframe))
        else:
            self.list_lineno = None

src/t/r/trepan-0.2.8/trepan/bwprocessor/main.py   trepan(Download)
        if self.curframe:
            self.list_lineno = \
                max(1, inspect.getlineno(self.curframe))
        else:
            self.list_lineno = None

src/p/y/pydbgr-0.2.6/pydbgr/processor/command/info_subcmd/line.py   pydbgr(Download)
 
        filename = self.core.canonic_filename(self.proc.curframe)
        msg1 = 'Line %d of \"%s\"'  % (inspect.getlineno(self.proc.curframe),
                                       self.core.filename(filename))
        msg2 = ('at instruction %d' % self.proc.curframe.f_lasti)

src/t/r/trepan-0.2.8/trepan/processor/command/info_subcmd/line.py   trepan(Download)
 
        filename = self.core.canonic_filename(self.proc.curframe)
        msg1 = 'Line %d of \"%s\"'  % (inspect.getlineno(self.proc.curframe),
                                       self.core.filename(filename))
        msg2 = ('at instruction %d' % self.proc.curframe.f_lasti)

src/c/o/commodity-0.20140102/commodity/log.py   commodity(Download)
    def __init__(self, depth=0):
        frame = inspect.stack()[2 + depth]
        self.filename = child_relpath(inspect.getfile(frame[0]))
        self.line = inspect.getlineno(frame[0])
        self.funcname = frame[0].f_code.co_name

src/l/e/lettuce-farmer-HEAD/lib/sure/__init__.py   lettuce-farmer(Download)
def _get_line_number(func):
    try:
        return inspect.getlineno(func)
    except AttributeError:
        return func.func_code.co_firstlineno

src/p/y/pydbgr-0.2.6/pydbgr/processor/command/list.py   pydbgr(Download)
                first = max(1, self.proc.list_lineno - 2*listsize - 1)
            elif args[0] == '.':
                first = max(1, inspect.getlineno(curframe) - int(listsize/2))
            else:
                (modfunc, filename, first) = self.proc.parse_position(args[0])
                pass
        elif self.proc.list_lineno is None and self.core.is_running():
            first = max(1, inspect.getlineno(curframe) - int(listsize/2))
        else:
            first = self.proc.list_lineno + 1
                        a_pad = '  '
                        pass
                    if curframe and lineno == inspect.getlineno(curframe) \
                       and filename == curframe.f_code.co_filename:
                        s += '->'

  1 | 2  Next