def range_boundaries(range_string):
 m = ABSOLUTE_RE.match(range_string)
 (min_col, min_row, sep, max_col, max_row) = m.groups()
 min_col = column_index_from_string(min_col)
 min_row = int(min_row)
 if ((max_col is None) or (max_row is None)):
  max_col = min_col
  max_row = min_row
 else:
  max_col = column_index_from_string(max_col)
  max_row = int(max_row)
 return (min_col, min_row, max_col, max_row)

def range_boundaries ( range_string ) : m = ABSOLUTE_RE . match ( range_string ) ( min_col , min_row , sep , max_col , max_row ) = m . groups ( ) min_col = column_index_from_string ( min_col ) min_row = int ( min_row ) if ( ( max_col is None ) or ( max_row is None ) ) : max_col = min_col max_row = min_row else : max_col = column_index_from_string ( max_col ) max_row = int ( max_row ) return ( min_col , min_row , max_col , max_row )
convert a range string into a tuple of boundaries: cell coordinates will be converted into a range with the cell at both end .