When starting a django application using python manage.py shell
, I get an InteractiveConsole shell - I can use tab completion, etc.
Python 2.5.1
In Python3 this feature is enabled by default. My system didn't have the module readline
installed. I am on Manjaro. I didn't face this tab completion issue on other linux distributions (elementary, ubuntu, mint).
After pip
installing the module, while importing, it was throwing the following error-
ImportError: libncursesw.so.5: cannot open shared object file: No such file or directory
To solve this, I ran-
cd /usr/lib
ln -s libncursesw.so libncursesw.so.5
This resolved the import error. And, it also brought the tab completion in the python repl without any creation/changes of .pythonrc
and .bashrc
.