

def _main(sdb_path):
    from sdb import SDB
    with open(sdb_path, 'rb') as f:
        buf = f.read()
    s = SDB()
    s.vsParse(bytearray(buf))
    d = SdbDatabaseDumper(buf)
    for l in d.dump():
        sys.stdout.write(l.encode('utf-8'))
        sys.stdout.write('\n')

dataset/ETHPy150Open williballenthin/python-sdb/scripts/sdb_dump_database.py _main/VarMisuse@56/75 `s`->`buf`