class BinWriter():
    def __init__(self, output_file):
        self.output_file = output_file

    def write(self, data):
        binfile = open(self.output_file, "wb")
        binfile.write(bytes(data))
        binfile.close()