cytometer/data.py
def seek_character(fp, target):
        """
        Read file backwards until finding target character.
        :param fp: File pointer.
        :param target: Character that we are looking for.
        :return:
        c: Found character.
        """

        while fp.tell() > 0:
            c = fp.read(1)
            if c == target:
                break
            else:
                fp.seek(fp.tell() - 2)
        if fp.tell() == 0:
            raise IOError('Beginning of file reached before finding "}"')
        return c

        Read file backwards until finding target character.
        :param fp: File pointer.
        :param target: Character that we are looking for.
        :return:
        c: Found character.
        
Read file backwards until finding target character.
Read file backwards until finding target character .
def seek_character(fp, target):
        while fp.tell() > 0:
            c = fp.read(1)
            if c == target:
                break
            else:
                fp.seek(fp.tell() - 2)
        if fp.tell() == 0:
            raise IOError('Beginning of file reached before finding "}"')
        return c
def seek_character ( fp , target ) : while fp . tell ( ) > 0 : c = fp . read ( 1 ) if c == target : break else : fp . seek ( fp . tell ( ) - 2 ) if fp . tell ( ) == 0 : raise IOError ( 'Beginning of file reached before finding "}"' ) return c
Read file backwards until finding target character.
Read file backwards until finding target character .
"""
        Read file backwards until finding target character.
        :param fp: File pointer.
        :param target: Character that we are looking for.
        :return:
        c: Found character.
        """
None
fp
None
target
Character that we are looking for.
Character that we are looking for .