@staticmethod
def convert_range(start, stop, step, size):
    'Converts a start/stop/step range to start/count/interval\n\n        (i.e. changes from Python-style slice to CDF-style)\n        @param start: index to start a slice at, may be none or negative\n        @type start: int\n        @param stop: index at end of slice (one-past, standard Python),\n                     may be none or negative\n        @type stop: int\n        @param step: interval for stepping through stlice\n        @type step: int\n        @param size: size of list to slice\n        @type size: int\n        @return: (start, count, interval, rev) where:\n                   1. start is the start index, normalized to be within\n                      the size of the list and negatives handled\n                   2. count is the number of records in the slice,\n                      guaranteed to stop before the end\n                   3. interval is the skip between records\n                   4. rev indicates whether the sequence should be reversed\n        @rtype: (int, int, int, boolean)\n        '
    (start, stop, step) = slice(start, stop, step).indices(size)
    if (step < 0):
        step *= (- 1)
        count = int(((((start - stop) + step) - 1) / step))
        start = (start - ((count - 1) * step))
        rev = True
    else:
        count = int(((((stop - start) + step) - 1) / step))
        rev = False
    if (count < 0):
        count = 0
        start = 0
    return (start, count, step, rev)
Converts a start/stop/step range to start/count/interval

(i.e. changes from Python-style slice to CDF-style)
@param start: index to start a slice at, may be none or negative
@type start: int
@param stop: index at end of slice (one-past, standard Python),
             may be none or negative
@type stop: int
@param step: interval for stepping through stlice
@type step: int
@param size: size of list to slice
@type size: int
@return: (start, count, interval, rev) where:
           1. start is the start index, normalized to be within
              the size of the list and negatives handled
           2. count is the number of records in the slice,
              guaranteed to stop before the end
           3. interval is the skip between records
           4. rev indicates whether the sequence should be reversed
@rtype: (int, int, int, boolean)
@staticmethod
def convert_range(start, stop, step, size):
    'Converts a start/stop/step range to start/count/interval\n\n        (i.e. changes from Python-style slice to CDF-style)\n        @param start: index to start a slice at, may be none or negative\n        @type start: int\n        @param stop: index at end of slice (one-past, standard Python),\n                     may be none or negative\n        @type stop: int\n        @param step: interval for stepping through stlice\n        @type step: int\n        @param size: size of list to slice\n        @type size: int\n        @return: (start, count, interval, rev) where:\n                   1. start is the start index, normalized to be within\n                      the size of the list and negatives handled\n                   2. count is the number of records in the slice,\n                      guaranteed to stop before the end\n                   3. interval is the skip between records\n                   4. rev indicates whether the sequence should be reversed\n        @rtype: (int, int, int, boolean)\n        '
    (start, stop, step) = slice(start, stop, step).indices(size)
    if (step < 0):
        step *= (- 1)
        count = int(((((start - stop) + step) - 1) / step))
        start = (start - ((count - 1) * step))
        rev = True
    else:
        count = int(((((stop - start) + step) - 1) / step))
        rev = False
    if (count < 0):
        count = 0
        start = 0
    return (start, count, step, rev)