Catching a pywintypes.api_error excpeption?

Derek Basch dbasch at
Fri Aug 2 08:59:40 CEST 2002

Can someone tell me how to catch this exception with a
try, except clause:

    SetCommState(self.handle, dcb)
pywintypes.api_error: (87, 'SetCommState', 'The
parameter is incorrect.')

every exception I have previously worked with has been
a class such as IOError. How do i catch this one? 
Derek Basch

Do You Yahoo!?
Yahoo! Health - Feel better, live better

More information about the Python-list mailing list