Tuesday, October 29, 2013

missing the __line__ macro from C?

Frame objects to the rescue!

import sys

def __line__():
    f = sys._getframe().f_back
    return f.f_lineno + f.f_code.co_firstlineno

1 comment:

  1. Rejects parts fulfilled through Car Parts Express. Your interest calculator uk can't be used related with some other bound time striking or Trade Card markdown. Your e-voucher.

    ReplyDelete