@defer.inlineCallbacks
def recursive_dump(indent, obj, depth=0):
    if callable(obj):
        try:
            print "%s: " % obj,
            sys.stdout.flush()
            if obj.takes_arg:
                v = yield obj('arrrrrg')
            v = yield obj()
            v = v.replace('\n', '\\')
            if 60 > len(v):
                v = v[:50] + '...' + v[-7:]
        except Exception, e:
            v = 'ERROR: ' + str(e)
        print v

    else:
        indent = indent + '  '
        for x in obj:
            yield recursive_dump(indent, x, depth + 1)
dataset/ETHPy150Open meejah/txtorcon/examples/tor_info.py/recursive_dump/swapped operands of `>`