def ConvertToNumber(value):
  """Converts value, a string, into either an integer or a floating point
  decimal number.
  """
  try:
    # int() automatically promotes to long if necessary
    return int(value)
  except:
    return float(value)