

def current_state(self):
    tmap = {
        
    }
    main_thread = None
    import traceback
    from cStringIO import StringIO
    for t in threading.enumerate():
        if getattr(t, 'ident', None):
            tmap[t.ident] = t
        else:
            main_thread = t
    out = StringIO()
    sep = (('=' * 49) + '\n')
    for (tid, frame) in sys._current_frames().iteritems():
        thread = tmap.get(tid, main_thread)
        if (not thread):
            continue
        out.write(('%s\n' % (thread.getName(),)))
        out.write(sep)
        traceback.print_stack(out, file=out)
        out.write(sep)
        out.write('LOCAL VARIABLES\n')
        out.write(sep)
        pprint(frame.f_locals, stream=out)
        out.write('\n\n')
    self.logger.info(out.getvalue())

dataset/ETHPy150Open binarydud/pyres/pyres/horde.py Khan.current_state/VarMisuse@160/192 `frame`->`out`