def to_python(num):
	"""
	Convert a string passed in from AppleScript to a Python number.

	http://stackoverflow.com/questions/379906/python-parse-string-to-float-or-int | Javier
	"""
	try:
		return int(num)
	except ValueError:
		return float(num)