[GRASS-dev] Emitting a Python exception instead of calling exit in GRASS

2012-04-22 Thread Sören Gebbert
Dear devs, while thinking about a high level Python interface based on the low level ctypes interface a question raised in my mind: Is it possible to raise a Python exception instead of calling exit in case of a fatal error when using ctypes wrapped GRASS library functions? So the calling module c

Re: [GRASS-dev] Emitting a Python exception instead of calling exit in GRASS

2012-04-23 Thread Glynn Clements
Sören Gebbert wrote: > while thinking about a high level Python interface based on the low > level ctypes interface a question raised in my mind: > > Is it possible to raise a Python exception instead of calling exit in > case of a fatal error when using ctypes wrapped GRASS library > functions?

Re: [GRASS-dev] Emitting a Python exception instead of calling exit in GRASS

2012-04-24 Thread Sören Gebbert
Hi Glynn, many thanks for your feedback. I seems that i still have no idea how the stack/heap works ... but i am willingly to learn. Anyway, i would like to continue this discussion using the trac ticket system [1]. My suggestion is to generate wrapper functions around fatal error effected library