From: Barry S. <ba...@ba...> - 2016-06-25 17:18:19
|
My plan is to keep maintaining PyCXX 6.2 with fixes for the time being. In parallel I will release a Beta for PyCXX 7.0 for testing and feedback. I have bumped the version to 7.0 because of the extensive changes to way exceptions are handled in PyCXX. 7.0.0 should be compatible with earlier code, however this needs testing. The major feature of 7.0 is that you can raise and catch all standard python exceptions and any C++ user defined exceptions in an obvious way: try { Py::Callable callback = …; callback.apply( args ); } catch( Py::LookupError &e ) { e.clear(); std::cerr << “Lookup error” << std::endl; } Before you would have had to catch Py::Exception and then match to lookup error. You can have any nesting of C++ and python code calling each other and the exception will rise up the stack until caught by C++ or python code. Demo/Python3/simple.cpp and test_simple.py show how to use the new features. 7.0.0 has been tested on Windows, macOS and Fedora. 32 and 64 bit python has been tested as well as python versions 2.6, 2.7, 3.3, 3.4 and 3.5. Barry |