ipython how to execute several history lines

前端 未结 7 1527
梦谈多话
梦谈多话 2021-01-30 14:04

In ipython, we can use

_ih[32:39] 

To show history lines between 32 and 39. How can I directly execute these history lines?

7条回答
  •  日久生厌
    2021-01-30 14:56

    On recent versions of iPython you use the rerun magic-comand:

    %rerun 32:39

    Documentation on that command: http://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-rerun

提交回复
热议问题