def object2dict(obj):
    d = {}
    d['__class__'] = obj.__class__.__name__
    d['__module__'] = obj.__module__
    d.update(obj.__dict__)
    return d
convert object to a dict
dataset/ETHPy150Open sk1418/retmux/tmuxbk/util.py/object2dict