def write_float ( self , number ) : buf = pack ( self . byte_order + "f" , number ) self . write ( buf )
write a float to a binary file python
Writes a float to the underlying output file as a 4 - byte value .
def write_float(self, number):
        """ Writes a float to the underlying output file as a 4-byte value. """
        buf = pack(self.byte_order + "f", number)
        self.write(buf)