"Skip Montanaro" <[EMAIL PROTECTED]> escribió en el mensaje 
news:[EMAIL PROTECTED]
>
>    Ximo> And my question is how can show the execution error whitout exit
>    Ximo> of the program, showing it in the error output as
>
> 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.









>
> Skip 


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to