jplephem/daf.py
def comments(self):
        """Return the text inside the comment area of the file."""
        record_numbers = range(2, self.fward)
        if not record_numbers:
            return ''
        data = b''.join(self.read_record(n)[0:1000] for n in record_numbers)
        try:
            return data[:data.find(b'\4')].decode('ascii').replace('\0', '\n')
        except IndexError:
            raise ValueError('DAF file comment area is missing its EOT byte')
        except UnicodeDecodeError:
            raise ValueError('DAF file comment area is not ASCII text')
def comments(self):
        """Return the text inside the comment area of the file."""
        record_numbers = range(2, self.fward)
        if not record_numbers:
            return ''
        data = b''.join(self.read_record(n)[0:1000] for n in record_numbers)
        try:
            return data[:data.find(b'\4')].decode('ascii').replace('\0', '\n')
        except IndexError:
            raise ValueError('DAF file comment area is missing its EOT byte')
        except UnicodeDecodeError:
            raise ValueError('DAF file comment area is not ASCII text')
def comments ( self ) : record_numbers = range ( 2 , self . fward ) if not record_numbers : return '' data = b'' . join ( self . read_record ( n ) [ 0 : 1000 ] for n in record_numbers ) try : return data [ : data . find ( b'\4' ) ] . decode ( 'ascii' ) . replace ( '\0' , '\n' ) except IndexError : raise ValueError ( 'DAF file comment area is missing its EOT byte' ) except UnicodeDecodeError : raise ValueError ( 'DAF file comment area is not ASCII text' )
Return the text inside the comment area of the file.
Return the text inside the comment area of the file .