How to repeat last command in python interpreter shell?

后端 未结 26 1159
一个人的身影
一个人的身影 2020-11-29 16:43

How do I repeat the last command? The usual keys: Up, Ctrl+Up, Alt-p don\'t work. They produce nonsensical characters.

(ve)[kakarukeys@localhost ve]$ python
         


        
26条回答
  •  [愿得一人]
    2020-11-29 17:03

    Ipython isn't allways the way... I like it pretty much, but if you try run Django shell with ipython. Something like>>>

    ipython manage.py shell
    

    it does'n work correctly if you use virtualenv. Django needs some special includes which aren't there if you start ipython, because it starts default system python, but not that virtual.

提交回复
热议问题