Accepting only numbers as input in Python
<p>Is there a way to accept only numbers in Python, say like using <code>raw_input()</code>? </p>

<p>I know I can always get the input and catch a <code>ValueError</code> exception, but I was interested in knowing whether there was someway I could force the prompt to accept only numbers and freeze on any other input.</p>
