getting my hands dirty with C++ and ZScript and managed to write a C++ DLL which I can load in a ZScript with FileExecute.... which then continues to host a .NET CLR with a loaded C# dll, which then launches a Python script (we use the same C# dll from Max).
C# talks to Python via ZMQ (thanks to Rob Galanakis for mentioning ZMQ). For the RPC calls JSON-RPC is used.
So far I can launch a Python script from ZBrush, cpp, Python, 3ds Max, Photoshop Extendscript and then call remote procedures either from Python or from the host app. Still working on ZBrush now - so far it's just one-directional communication, until I figure out if I can use the Sleep command for polling.
The idea is to have a universal communication library for RPC calls to a Python script which is launched by a host app. E.g. we can then put all the business logic of statistics, QA or file management scripts into python. Or we can just extend the app itself using Python.
Anyway, there's little to show as it's just a bunch of DLLs and scripts with text output, but if someone is crazy enough to attempt something similar... just ask