'Return only those data rows that should be printed, based on slicing and sorting.
Arguments:
options - dictionary of option settings.'

def _get_rows(self, options):

    rows = copy.deepcopy(self._rows[options['start']:options['end']])
    if options['sortby']:
        sortindex = self._field_names.index(options['sortby'])
        rows = [([row[sortindex]] + row) for row in rows]
        rows.sort(reverse=options['reversesort'], key=options['sort_key'])
        rows = [row[1:] for row in rows]
    return rows
