glymur/jp2box.py
def write(self, fptr):
        """Write a data entry url box to file.
        """
        # 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)
Write a data entry url box to file.
        
Write a data entry url box to file.
Write a data entry url box to file .
def write(self, fptr):
        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)
def write ( self , fptr ) : 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 )
Write a data entry url box to file.
Write a data entry url box to file .
"""Write a data entry url box to file.
        """ # Make sure it is written out as null-terminated.
self
fptr