Multi-line editing broken in IPython 7.0.1

前端 未结 1 456
时光取名叫无心
时光取名叫无心 2021-01-18 17:40

I\'m using IPython in zsh shell and I\'m having a trouble defining a function with multiple lines.

For example, in the original Python shell, I can define a function

1条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-18 18:40

    It's a known bug (see also this).

    As it's clear from the issues I've referenced, it's not a bug with the Anaconda distribution but something that slipped into the 7.0 release of IPython.

    Matthias Bussonier suggested to use C-o (that is Control o) as a stop gap measure. C-o opens new blank lines below the current line that you can reach and edit using the arrow keys — it's not a very satisfactory solution but for now there is no other solution (except, of course, downgrading IPython to 6.x).

    Concluding, use C-o to open new lines and wait for a bug fix or downgrade to IPython 6.x.


    Additional Info

    Carlos Cordoba, one of the Spyder maintainers, in a comment to an answer of mine says that also the qtconsole is affected by this bug...

    Moreover the bug, fixed in the IPython 7.1 shell, is still present in the same version of qtconsole and the stop-gap measure I've mentioned (Ctrl-o to open a line below the current one) does not work in qtconsole.

    0 讨论(0)
提交回复
热议问题