def store_bin(p, file):
    with open(p, 'wb') as f:
        if isinstance(file, int):
            f.write(struct.pack('i', file))
        elif isinstance(file, str):
            f.write(file)
        else:
            raise TypeError('Can only write str or int')
def store_bin(p, file):
    with open(p, 'wb') as f:
        if isinstance(file, int):
            f.write(struct.pack('i', file))
        elif isinstance(file, str):
            f.write(file)
        else:
            raise TypeError('Can only write str or int')