I guess that :py
command is executed by some kind of extended Python interpreter. This extended Python has vim
package available:
:py import vim; print(dir(vim)); print(vim.__package__, vim.__name__)
outputs:
['Buffer', 'Dictionary', 'Function', 'List', 'Options', 'Range', 'TabPage',
'VAR_DEF_SCOPE', 'VAR_FIXED', 'VAR_LOCKED', 'VAR_SCOPE', 'VIM_SPECIAL_PATH', 'Window',
'_Loader', '__doc__', '__name__', '__package__', '_chdir', '_fchdir', '_find_module',
'_get_paths', '_getcwd', '_load_module', 'bindeval', 'buffers', 'chdir', 'command',
'current', 'error', 'eval', 'fchdir', 'find_module', 'foreach_rtp', 'options', 'os',
'path_hook', 'strwidth', 'tabpages', 'vars', 'vvars', 'windows']
(None, 'vim')
Where could I find the documentation of this vim
package?