execution error
Ximo
elrei69 at yahoo.es
Tue May 24 11:02:44 EDT 2005
>> Ximo> My question is how can show the execution error whitout exit of
>> the program, showing it in the error output as
>> Skip> You need to catch ZeroDivisionError. Here's a trivial example:
>> >>> try:
>> ... 6/0
>> ... except ZeroDivisionError:
>> ... print "whoops! divide by zero..."
>> ...
>> whoops! divide by zero...
But I execute the operation in the else:
try:
except ZeroDivisionError:
print "whoops! divide by zero..."
else:
execute( )
The exeption is produced after.
More information about the Python-list
mailing list