def coordinate_from_string(coord_string):
 match = COORD_RE.match(coord_string.upper())
 if (not match):
  msg = ('Invalid cell coordinates (%s)' % coord_string)
  raise CellCoordinatesException(msg)
 (column, row) = match.groups()
 return (column, int(row))

def coordinate_from_string ( coord_string ) : match = COORD_RE . match ( coord_string . upper ( ) ) if ( not match ) : msg = ( 'Invalid cell coordinates (%s)' % coord_string ) raise CellCoordinatesException ( msg ) ( column , row ) = match . groups ( ) return ( column , int ( row ) )
convert a coordinate string like b12 to a tuple .