I’m working on a python3 interpreter plugin for MaxMSP (GitHub - shakfu/py-js: Simple (and extensible) python3 externals for maxmsp) implemented with the python c-api. While it works ok, one of the intractable problems is related to the proper unloading of c-extensions such as numpy. Basically I can use a c-extension but I have to restart the host application if I call Py_FinalizeEx(). I think this is almost a deal-breaker for some.
Thinking how Jupyter solves these issues, I’ve been considering whether it would be possible to implement a very basic client / frontend at the Max/MSP side which communicates with a python (to non-Python) kernel using Jupyter protocols. This would be implemented in c or c++ or in pure python (as far as I remember pyzmq has a c-extension dependency so that could cause problems).
I would appreciate any advice or guidance as to whether this is a good idea to begin with and if so any pointers and/or example to help me get started.