Here are the examples of the python api sys.exc_traceback.tb_frame taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Example 1
Project: autopsy Source File: extformat.py
def magicformat(format):
"""Evaluate and substitute the appropriate parts of the string."""
try: 1/0
except: frame = sys.exc_traceback.tb_frame
while frame.f_globals["__name__"] == __name__: frame = frame.f_back
return dictformat(format,frame.f_locals, frame.f_globals)