def IsAllDigits( str ):
	""" Is the given string composed entirely of digits? """
	import string
	match = string.digits
	ok = 1
	for letter in str:
		if letter not in match:
			ok = 0
			break
	return ok
 Is the given string composed entirely of digits? 
recipes/Python/52660_Simple_tests_using_Exceptions/recipe-52660.py