Create language kernels for IPython for a language without ZeroMQ bindings

大城市里の小女人 提交于 2020-03-18 17:15:01

问题


There are some interesting descriptions of writing language kernels to allow a language previously unsupported by IPython to be executed from IPython.

In all cases, the kernel creation step involves using the target language's ZeroMQ bindings (since ZeroMQ is a major architectural component of IPython's front-end to kernel communication protocol).

In my company, a proprietary language was created a few years ago and is maintained with compilers to bytecode (with a bytecode runner written in C++), Flash, and JavaScript ... it's still heavily used today but it has never had anything like a REPL.

This language is a functional language similar to Haskell or SML, and it has no ZeroMQ bindings with no plans for the language maintainers to add any.

Is there a way to still write a kernel that can communicate with IPython?


回答1:


If your language has Python bindings, or you can drive a REPL from Python using something like Pexpect, you can create a wrapper kernel, reusing the IPython communication machinery.

This is documented here: http://ipython.org/ipython-doc/dev/development/wrapperkernels.html



来源:https://stackoverflow.com/questions/28517289/create-language-kernels-for-ipython-for-a-language-without-zeromq-bindings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!