[IPython-dev] Multiline editing in a qtconsole-style app

Osborn, Raymond rosborn at anl.gov
Sat Nov 28 16:08:25 EST 2015

We have been developing an application, called NeXpy (http://nexpy.github.io/nexpy/), that embeds an IPython (or Jupyter) shell within a PyQt GUI. Much of the code was based on the IPython v3 code for the qtconsoleapp, and I was relieved that we were able to make the switch to IPython 4 reasonably easily based on the qtconsoleapp.py in the new qtconsole package. However, I only just noticed that we seem to have lost the ability to do multiline editing, without using the Ctrl key modifier. Even with the modifier, the indent is not correctly set, so the behavior has diverged from the ipython qtconsole, where multiline editing is automatic if the code is not complete and a proper indent is set. Multiline editing works fine if I paste code into the shell - it’s only if I try to type it in that it never enters multiline editing mode.

I made the change a while ago, and set the console config variable execute_on_complete_input to False. When set to the default value of True, it does automatically go into editing mode with an incomplete line, but it then never completes even when the code is complete.

It’s a complicated program, so I’m not sure what code extract might be helpful to diagnose the problem, but I hoped that readers of this list might be aware of the changes from the IPython QtConsole that could have triggered this change. I will of course provide whatever extra information is needed on request.

Thanks in advance,
Ray Osborn
Materials Science Division
Argonne National Laboratory
Argonne, IL 60439, USA
Phone: +1 (630) 252-9011
Email: ROsborn at anl.gov<mailto:ROsborn at anl.gov>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151128/826bd4b9/attachment.html>

More information about the IPython-dev mailing list