ipython 是增强的交互式解释器
pip install ipython
python ./manage.py shell
输出:
Python 3.6.8 (default, Sep 10 2021, 09:13:53)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.16.3 -- An enhanced Interactive Python. Type '?' for help.
In [1]:
ipython 中文乱码解决:
vi ~/.ipython/ipythonrc
输入下面 4 行内容:
# These commands allow you to indent/unindent easily, with the 4-space
# convention of the Python coding standards. Since IPython's internal
# auto-indent system also uses 4 spaces, you should not change the number of
# spaces in the code below.