What Exceptions are there? (was: "a better input")

Thomas Heller theller at python.net
Fri May 10 15:18:21 EDT 2002


"Duncan Booth" <duncan at NOSPAMrcp.co.uk> wrote in message news:Xns920AA51108B90duncanrcpcouk at 127.0.0.1...
> "Emile van Sebille" <emile at fenx.com> wrote in
> news:hQQC8.10635$Po6.194 at rwcrnsc52.ops.asp.att.net:
>
> > Louis M. Pecora
> >> Ok, you knew there was an exception of that type (ValueError), but is
> >> there a way to get a list of exceptions in a Python module or in the
> >> main Python core?  There are probably zillions.
> >
> >  dir(__builtins__) gives you a good start.
> >
> If you have a sufficiently recent version of Python:
>
> Go to your python installation, change into the lib directory and run:
>     pydoc -g
> You should get a small window popping up with some buttons and a text box
> labelled 'Search for'. Type 'exceptions' into the box, press return and
> click on the second entry 'exceptions - Python's standard exception class
> hierarchy'.
And for the (X)Emacs users:
If you have a recent version of python-mode.el,
type the word 'exceptions' in a python buffer, press F1,
and voila! the same diagram appears.

Thomas





More information about the Python-list mailing list