def TypeCodeToType(typeCode):
  """
  Convert a type code to the class it represents
  """

  if typeCode in ["b", "d", "f", "s"]:
    return float
  elif typeCode in ["i", "l"]:
    return int
  elif typeCode in ["c"]:
    return str
  else:
    raise Exception("Unrecognised type code: " + typeCode)
  
  return