FINANCIAL MODELLING PACKAGE IN PYTHON?

Robin Becker robin at jessikat.demon.co.uk
Wed Jan 5 08:49:24 EST 2000


In message <20000105082703.A9441 at vislab.epa.gov>, Randall Hopper
<aa8vb at yahoo.com> writes
>Robin Becker:
> |Is there an obvious way to allow an extension module to write messages to
> |various fd type objects?
>
>Do you mean, change a module that's written to dump to stdout or stderr so
>that it writes to objects?  You can always replace sys.stdout/stderr
>before/after calling the extension module.  Not pretty, but it works.
>
> |Also under certain extreme circumstances my code would like to report a
> |total failure eg attempt to divide by error. I would like to ask more
> |experienced pythoneers how arithmetic errors are handled using built in
> |IEEE exceptions and how does one gracefully crash a python script? (eg
> |an abend/abort).
>
>raise ArithmeticError, "Oops"
>raise ZeroDivisionError, "Ouch"
>
>?
>
yes that's python, but what's the best way to do it in an existing C
library?
-- 
Robin Becker




More information about the Python-list mailing list