Creating exception class with custom fields in Python/C API

2010-06-28 Thread ty ty
Hello, list! I'm writing a wrapper for C-library. When something goes wrong in that library, i can get error details. And i want to assign them to fields of my own exception class. For this purpose, i looked throught Modules/_ctypes/_ctypes.c (in python source tree) and implemented same things

Extension modules and common routines in Python/C API

2010-06-27 Thread ty ty
Hi, folks! I'm writing wrapper for C library. This library consist of several parts. And i want split my extension package into different extension modules. I think, this is the right way ;-) But, there are some common parts that exist in extension package, get_library_version, Error, and so o