Create language kernels for IPython for a language

2019-04-30 19:04发布

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条回答
forever°为你锁心
2楼-- · 2019-04-30 19:46

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

查看更多
登录 后发表回答