Open zsaladin opened 4 years ago
Hi @zsaladin,
Easiest is probably to use a ptterm widget in your application to emulate a full terminal and run IPython in there. IPython is not meant to be embedded in another application like this.
Otherwise, maybe check this example: https://github.com/prompt-toolkit/python-prompt-toolkit/blob/master/examples/full-screen/calculator.py
See: https://github.com/prompt-toolkit/ptterm
Hope that helps.
I am trying to embed IPython into my app using prompt toolkit. I'd like to put IPython shell bottom of HSplit Container.
Here's an example app layout.
But I have hard time to do it.
First, IPython uses
prompt
. It calls Application.run() internally and uses its own layout. So it is difficult to use it with my prompt toolkit application.Second IPython calls
prompt
repeatedly. I manipulatedshell.pt_app.layout.container
. So the layout could be changed. But after typing enter key, the whole layout was drawn again. The reason is thatprompt
redraws whole containers and is always called after completing input.Could you advise for it?