Within a vim script it is possible to embed some python code, as long as vim is built with the +python
feature.
function! IcecreamInitialize()
python << EOF
class StrawberryIcecream:
def __call__(self):
print('EAT ME')
EOF
endfunction
However, some people have vim built with +python3
instead. This brings up some compatibility issues for vim plugins. Is there a generic command which calls whichever python version is installed on the computer?