'readlines(fileobj, encoding) -> list of lines'

@staticmethod
def readlines(fileobj, encoding):

    try:
        data = fileobj.read(IMPORT_PEEK_SIZE)
        return unicode(data, encoding, errors='replace').splitlines()[:IMPORT_PEEK_NLINES]
    except UnicodeError:
        return None
