This Gist demonstrates how to bridge an external Python process to Vim9
using jobs and channels (this is in contrast to the if_py
Python
interface, which runs a Python interpreter within the Vim process).
Running a language interpreter separately brings more flexibility
– for instance, you can easily run Python from a virtualenv
, or
run a version of Python other than the one against which Vim was built –
and avoids the fragility that sometimes creeps into the built-in
language bindings as the Python C API changes.