¡@

Home 

c++ Programming Glossary: pyerr_setstring

Writing Python bindings for C++ code that use OpenCV

http://stackoverflow.com/questions/12957492/writing-python-bindings-for-c-code-that-use-opencv

va_start ap fmt vsnprintf str sizeof str fmt ap va_end ap PyErr_SetString PyExc_TypeError str return 0 class PyAllowThreads public PyAllowThreads.. allowThreads expr catch const cv Exception e PyErr_SetString opencv_error e.what return 0 using namespace cv static PyObject.. va_start ap fmt vsnprintf str sizeof str fmt ap va_end ap PyErr_SetString PyExc_TypeError str return 0 static size_t REFCOUNT_OFFSET size_t..

wrapping a list of structs with boost.python

http://stackoverflow.com/questions/6776888/wrapping-a-list-of-structs-with-boost-python

T const_iterator it x.begin it x.end it i if it v return i PyErr_SetString PyExc_ValueError Value not in the list throw boost python error_already_set.. pos 0 pos i pos it if i 0 i int x.size x.erase it else PyErr_SetString PyExc_IndexError Index out of range boost python throw_error_already_set.. it x.begin for int pos 0 pos i pos it return it else PyErr_SetString PyExc_IndexError Index out of range throw boost python error_already_set..

Boost.Python custom exception class

http://stackoverflow.com/questions/9620268/boost-python-custom-exception-class