How do we find vi-like key bindings in Intel python?

Issue

I have set up the system default python to accept the vi-like key bindings (e.g. k for previous line in the history) by writing the following line in `~/.inputrc

set editing-mode vi 

The system’s built-in Python REPL uses the ‘readline’ library, which can read configuration files. However, it doesn’t appear that this file is having any impact on Intel Python.  How can I use the vi-like key bindings in the REPL (the interactive command line interpreter) of Intel Python?

Solution

To use vi-like key bindings in Intel Python, you need to install gnureadline package since Intel Python uses GPL code and that license is not compatible with the Intel MKL library.

pip install gnureadline

Intel Python will respect the ~/.inputrc file containing the "set editing-mode vi" line.

Answered By – AlekhyaV – Intel

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published