I have learned that py3eval('print(sys.path)') return the sys.path used internally by Vim.

Say that i want add a new_path to the current sys.path. How shall I do?

I would appreciate solutions that work with Vim9.

1 Answer 1


I would do:

:py sys.path.append('new_path')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.