code: def write(self, fptr):
          
          # Make sure it is written out as null-terminated.
          url = self.url
          if self.url[-1] != chr(0):
              url = url + chr(0)
          url = url.encode()
  
          length = 8 + 1 + 3 + len(url)
          write_buffer = struct.pack('>I4sBBBB',
                                     length, b'url ',
                                     self.version,
                                     self.flag[0], self.flag[1], self.flag[2])
          fptr.write(write_buffer)
          fptr.write(url)
docs: Write a data entry url box to file.