How to enable history in Django shell in python

I am using Django shell_plus .

The readline and rlcompleter modules are installed in rlcompleter .

But I find that when I close the shell_plus session, I can return to the history commands that I used in previous sessions.

In my office, I can return to previous teams.

what do I need to do for this

+4
source share
2 answers

Do you have IPython installed?

docs mentions that

The default permission order is bpython, ipython, python.

PS I did not use bpython, but there is also history .

+6
source

You can use bpython, which has a story, and many other fantastic features, if you use virtualenv, install it with pip.

 pip install bpython 

or globally

 apt-get install bpython 

For me, this is the most amazing interactive shell for python.

+3
source

Source: https://habr.com/ru/post/1488819/


All Articles