On Saturday 29 January 2011 03:32:22 Robert Kern wrote:
> On 1/28/11 3:55 AM, Algis Kabaila wrote:
> > Attached is a tar ball (~2K size) of a program for matrix
> > inversion "inv.py" (using numpy) and the Qt Designer
> > generated file "inv.ui". To run the program one needs to
> > process "inv.ui" as follows:
>
> You catch the exception with a try: except: suite just like
> you would in any other program.
>
> try:
> result = la.inv(amatrix)
> except la.LinAlgError, e:
> printline("%s: %s" % (type(e).__name__, e))
> else:
> printline('\n inverse')
> ...
> self.finished = True
>
>
> http://docs.python.org/tutorial/errors.html#handling-exceptio
> ns
Thank you for that. Both you and Michael Thompson identified a
simple omission in my program - there is no excuse for such a
basic omission. Particular thank you to Robert who took the
trouble to find the type of exception that linear algebra
package raises - special thank you to you!
OldAl.
--
Algis
http://akabaila.pcug.org.au
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside