code: def xread(file, length):
      "Read exactly length bytes from file; raise EOFError if file ends sooner."
      data = file.read(length)
      if len(data) != length:
          raise EOFError
      return datf xread(file, length):
      "Read exactly length bytes from file; raise EOFError if file ends sooner."
      data = file.read(length)
      if len(data) != length:
          raise EOFError
      return data
docs: Read exactly length bytes from file; raise EOFError if file ends sooner.