def write(self, fptr):
<EOL>url = self.url<EOL>if self.url[-<NUM_LIT:1>] != chr(<NUM_LIT:0>):<EOL><INDENT>url = url + chr(<NUM_LIT:0>)<EOL><DEDENT>url = url.encode()<EOL>length = <NUM_LIT:8> + <NUM_LIT:1> + <NUM_LIT:3> + len(url)<EOL>write_buffer = struct.pack('<STR_LIT>',<EOL>length, b'<STR_LIT>',<EOL>self.version,<EOL>self.flag[<NUM_LIT:0>], self.flag[<NUM_LIT:1>], self.flag[<NUM_LIT:2>])<EOL>fptr.write(write_buffer)<EOL>fptr.write(url)<EOL>
Write a data entry url box to file.