From: Will B. <wb...@mi...> - 2015-03-31 14:39:49
|
Hello, I am working on the OpenMOC code project which combines highly optimized algorithms written in C/C++ which are wrapped and exposed to Python using SWIG. Although some of our users write Python scripts to run simulations with OpenMOC, many are now beginning to increasingly use IPython Notebooks for a more interactive simulation experience. One issue we have run into with IPython Notebook is that some of our C++ routines print a message and call the exit(1) to terminate execution if a error condition is reached. This seems to work fine for typical Python scripting, but unfortunately kills an IPython Notebook kernel. Instead, we would like to kill execution if an error condition is met, but allow the IPython Notebook kernel to continue running so the user may adjust their simulation parameters to correct the issue without re-opening the Notebook. Is there any way to terminate execution of wrapped C/C++ routines without killing IPython Notebook? Thank you, -- Will Boyd Nuclear Science & Engineering Massachusetts Institute of Technology Email: wb...@mi... Cell: 423.413.8469 |