Make ipython always execute command when I press return key? -
after migrating ipython, noticed return key causes line break instead of executing command. example if have cursor before )
in print()
, result in:
print( )
how can make run print()
in , other cases?
this happens when in multiline mode, e.g.
in [200]: in range(3): ...: print(i) ...:
you either need move end of block (<end>
) , return twice (or more if editing has accumulated bunch of blank lines); or use <esc><return>
.
it shouldn't happen in single line entry. wrapped lines maybe. in case <end>
, <esc>
work. key press cost of multiline editing convenience.
Comments
Post a Comment