Dear developers,
i am trying to register a Python function as error handler callback
using ctypes in libgis.
I use this code in the temporal framework:
{{{
def error_handler(data):
pass
CALLBACK = CFUNCTYPE(None, c_void_p)
CALLBACK.restype = None
CALLBACK.argtypes = c_void_p
cerror_handler
Dear Developers,
any clue about how to register a Python function
as error handler in libgis using libgis.G_add_error_handler()?
Or is there any other way to recognize a fatal error call from libgis in Python?
I tried to catch the signals, unfortunately is Python not able to
catch signals emitted
Sören Gebbert wrote:
> Dear developers,
> i am trying to register a Python function as error handler callback
> using ctypes in libgis.
> I use this code in the temporal framework:
>
>
> {{{
> def error_handler(data):
> pass
>
> CALLBACK = CFUNCTYPE(None, c_void_p)
AFAICT, this needs to b
Hi Glynn,
thanks a lot, that solved the issue.
Best regards
Soeren
2015-02-14 4:10 GMT+01:00 Glynn Clements :
>
> Sören Gebbert wrote:
>
>> Dear developers,
>> i am trying to register a Python function as error handler callback
>> using ctypes in libgis.
>> I use this code in the temporal framewo
Sören Gebbert wrote:
> > AFAICT, this needs to be:
> >
> > CALLBACK = CFUNCTYPE(c_void_p, c_void_p)
> >
> > For callbacks, ctypesgen converts any return type which isn't a
> > primitive C type to c_void_p. And None isn't a primitive C type.
>
> thanks a lot, that solved the issue.
Actual