View embedded_qtconsole.py
from IPython.frontend.qt.console.rich_ipython_widget import RichIPythonWidget
from IPython.frontend.qt.embedded_kernelmanager import QtEmbeddedKernelManager
from IPython.frontend.qt.kernelmanager import QtKernelManager
from IPython.lib import guisupport
def main():
app = guisupport.get_app_qt4()
km = QtEmbeddedKernelManager()