> try:
> ...
> except IOError, msg:
> print "I/O Error:", msg
>
> Otherwise, you can use the type() and len() functions to detect what
> kind of error data you have, e.g.
>
> if type(msg) == type(()): # It's a tuple
> if len(msg) == 2:
> left, right = msg
> print left, ":", right
> elif len(msg) == 4:
> errortype, errorcode, errormsg, messageobject = msg
> if errorcode == 404:
> ...
> etc.
> else:
> print msg # Tuple of other size
> else:
> print msg # Not a tuple
Thanks Guido! I appreciate the help (and patience with my basic questions)...
rjf
-- | "I don't like being bluffed -- makes me doubt | rjf@aurora.pcg.com | | my perception of reality..." | 71722,3175 | | Chris in the morning on KBHR | | +---------------------------------------------------+-----------------------+