Can anyone reproduce this crash?

Alf P. Steinbach alfps at start.no
Fri Apr 16 12:54:48 CEST 2010


Python 3.1.1 in Windows XP Prof:


<code filename="sum.v4.py" language="Py3">
def number_from_user( prompt ):
     while True:
         spec = input( prompt )
         try:
             return float( spec )
         except ValueError:
             s = "Sorry, '{}' is not a valid number spec. Try e.g. '3.14'."
             print( s.format( spec ) )
             print()

print( "This program computes the sum of two numbers A and B." )
print()
a = number_from_user( "Number A, please: " )
b = number_from_user( "Number B, please: " )
sum = a + b
print()
print( "{} + {} = {}".format( a, b, sum ) )
</code>


To be thorough I tested the reaction to typing [Ctrl C] at the first prompt. It 
then displayed the first part of traceback output,


<output part="1">
C:\Documents and Settings\Alf> sum.v4.py
This program computes the sum of two numbers A and B.

Number A, please: Traceback (most recent call last):
</output>


and seemingly hung for, I don't know, 20 seconds?, whereupon Microsoft's "Please 
tell Bill Gates about it" box popped up; the interpreter had crashed.

Regretfully declining the offer to tell Bill Gates, and this I don't quite 
understand, possibly buffer thing?, one more line of output then appeared:


<output part="2">
   File "C:\Documents and Settings\Alf\sum.v4.py", line 13, in <module>

C:\Documents and Settings\Alf> _
</output>


In a normal traceback there are four more lines.

I thought I'd report this so I tried it several times more but unable to 
reproduce: instead of above hang + crash + truncated traceback the complete 
expected traceback appeared and the program terminated properly.

Can anyone reproduce?


Cheers,

- Alf



More information about the Python-list mailing list