qtconsole
qtconsole copied to clipboard
Issue with executing cells when launching a Qt console from a Qt console
I am trying to launch a Qt console from an app launched from a Qt console (so to simplify, I am trying to launch a Qt console inside a Qt console). If I type:
%gui qt
from __future__ import absolute_import, division, print_function
from IPython import get_ipython
from ipykernel.connect import get_connection_file
from qtconsole.rich_jupyter_widget import RichJupyterWidget
from qtconsole.client import QtKernelClient
shell = get_ipython()
client = QtKernelClient(connection_file=get_connection_file())
client.load_connection_file()
client.start_channels()
control = RichJupyterWidget()
control.kernel_client = client
control.shell = shell
control.show()
inside a qtconsole, I get a new console, but in the new console it seems that I have to press shift-enter in that console to get cells to execute. Is there a way to make the new qtconsole behave 'normally', i.e. execute cells after pressing only enter?
Original qtconsole:
New qtconsole:
I suspect that gets messy because the second console has its UI and its kernel in the same process, but I don't know precisely what goes wrong.