ctypes and DLL exceptions

Uri Nix Uri.Nix at gmail.com
Wed Feb 21 02:46:37 EST 2007


Hi all,

  Is there a method to deal with exceptions originating from a DLL
creatively?

  After experimentation, I've observed that calling a ctypes wrapped
DLL exception raises WindowsError, and an accompanying code. Does the
code mean something? Can I throw an object from C++ and somehow catch
it in Python?

  [Using Python 2.4 on Windows XP]

Cheers,
  Uri




More information about the Python-list mailing list