3

Embedding IPython Qt console in a PyQt application addresses this question, but the latest answers are from 2014. Apparently things have changed since then, because the following code gives warnings:

from IPython.qt.inprocess import QtInProcessKernelManager
from IPython.qt.console.rich_ipython_widget import RichIPythonWidget

gives:

local/lib/python2.7/site-packages/IPython/qt.py:13: ShimWarning: The `IPython.qt` package has been deprecated. You should import from qtconsole instead.

But QtInProcessKernelManager is only present in IPython.qt.inprocess.

What's the non-deprecated way to embed a IPython Qt console in a PyQt application?

Community
  • 1
  • 1
Thomas Johnson
  • 10,776
  • 18
  • 60
  • 98

1 Answers1

1

Your imports should now look like:

from qtconsole.inprocess import QtInProcessKernelManager
from qtconsole.rich_jupyter_widget import RichJupyterWidget

For a complete example, check out example from the project github: https://github.com/jupyter/qtconsole/blob/master/examples/inprocess_qtconsole.py

For more general information, you'll want to check out the Project Jupyter website and/or perform some searches on the ipython --> jupyter transition.

polymathcoder
  • 73
  • 1
  • 5