code: def readfmt(self, fmt):
          
          size = struct.calcsize(fmt)
          blob = self.read(size)
          obj, = struct.unpack(fmt, blob)
          return obj
docs: Read a specified object, using a struct format string.