<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">Thanks for your reply. My inheritance chain includes the console_widget, so I have access to the _is_complete function, but it looks like I might have a different problem.</div>
<div class=""><br class="">
</div>
<div class="">I’ve been running this through my debugger again, and if I set ‘execute_on_complete_input’ to False, it doesn’t call the _is_complete function and assumes everything is complete. The shell then works apart from multiline editing. </div>
<div class=""><br class="">
</div>
<div class="">However, if I set ‘execute_on_complete_input’ to True (the default), then it calls the _is_complete function, sends an ‘is_complete’ request to the frontend, but never gets a reply. It calls the get_msg function in jupyiter_client/blocking/channels.py,
 but this always raises Empty. Sometimes the debugger causes timeout problems, but even when I remove all the breakpoints except for call to self._recv, it is never triggered, and this seems to explain why no lines in the shell are recorded as complete.</div>
<div class=""><br class="">
</div>
<div class="">I’ll see if I can reproduce this chain in the IPython qtconsole.</div>
<div class=""><br class="">
</div>
<div class="">Ray</div>
<div class=""><br class="">
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Nov 29, 2015, at 6:22 AM, Thomas Kluyver <<a href="mailto:takowl@gmail.com" class="">takowl@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div class="gmail_extra">Hi Ray,<br class="">
</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On 28 November 2015 at 21:08, Osborn, Raymond <span dir="ltr" class="">
<<a href="mailto:rosborn@anl.gov" target="_blank" class="">rosborn@anl.gov</a>></span> wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
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.</blockquote>
</div>
<br class="">
</div>
<div class="gmail_extra">I think I know what you're running into. In previous versions of the Qt console, the frontend decided whether to prompt for another line and how much to indent it by processing the Python code that was typed in. As we've moved towards
 supporting multiple languages, it's not appropriate for the frontend to make that decision, so it has to ask the kernel about it. It does that by making is_complete_request to the kernel:<br class="">
<a href="http://jupyter-client.readthedocs.org/en/latest/messaging.html#code-completeness" class="">http://jupyter-client.readthedocs.org/en/latest/messaging.html#code-completeness</a><br class="">
<br class="">
</div>
<div class="gmail_extra">Assuming you're using the Qt console with an IPython kernel, it should still be straightforward to use that, but I guess it needs some changes in your integration code to make sure the message gets through. The widget object now has
 an is_complete method, which you can see here:<br class="">
<a href="https://github.com/jupyter/qtconsole/blob/f2c8a31c387ce1e020ccdbb020091de2ee98dbf9/qtconsole/frontend_widget.py#L260" class="">https://github.com/jupyter/qtconsole/blob/f2c8a31c387ce1e020ccdbb020091de2ee98dbf9/qtconsole/frontend_widget.py#L260</a><br class="">
<br class="">
</div>
<div class="gmail_extra">Best wishes,<br class="">
</div>
<div class="gmail_extra">Thomas<br class="">
</div>
</div>
_______________________________________________<br class="">
IPython-dev mailing list<br class="">
<a href="mailto:IPython-dev@scipy.org" class="">IPython-dev@scipy.org</a><br class="">
https://mail.scipy.org/mailman/listinfo/ipython-dev<br class="">
</div>
</blockquote>
</div>
<br class="">
<div apple-content-edited="true" class="">-- <br class="">
Ray Osborn, Senior Scientist<br class="">
Materials Science Division<br class="">
Argonne National Laboratory<br class="">
Argonne, IL 60439, USA<br class="">
Phone: +1 (630) 252-9011<br class="">
Email: <a href="mailto:ROsborn@anl.gov" class="">ROsborn@anl.gov</a><br class="">
<br class="">
</div>
<br class="">
</body>
</html>