def read_fastaLike(file, startswith='>', maxrecords=-1):
    """
    Every time return one record using the 'yield' function,
    the return record is a list, containing the 'seqid' line,
    and 'sequence' lines.

    By default, the 'seqid' line starts with '>',while the 'sequence'
    lines don't. Change this behavior with 'startswith' option.

    Usage:
    >>>records = read_fastaLike('myFastaLikefile')
    >>>for rec in records:
    >>>    print('seqid:', rec[0])
    >>>    print('first seq line:', rec[1])

    """
    with open(file, 'r') as fh:
        firstline = True
        count = 0
        rec = []
        for i in fh:
            i = i.rstrip()
            if i.startswith(startswith):
                if firstline:
                    firstline = False
                else:
                    yield rec
                count += 1
                if maxrecords > 0 and count > maxrecords:
                    raise StopIteration
                rec = []
                rec.append(i)
            else:
                rec.append(i)
        yield rec
        raise StopIteration
