-
Hi, Is there a way to use ipython as an internal shell. That is, when pressing I was able to use the ipython REPL as an external shell when pressing Would this turn into a new feature request to integrate ipython as an internal shell? What are the current difficulties with supporting ipython as an internal shell? I am not aware of them yet. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
When in the internal shell, Urwid is managing interactions with the terminal. (I.e. the internal shell is not a general-purpose terminal.) That's needed so that the output stays contained in the appropriate subwindow. So if you can get IPython to do its I/O through Urwid, I think there's a chance. But it would still be a tricky engineering problem. |
Beta Was this translation helpful? Give feedback.
Think of Urwid as something that allows its user to think about nice abstract things like "Window" and "text entry box" and "key event" and then talks the required ANSI escape sequence gobbledygook to the terminal.
The problem here is that both Urwid and IPython by default talk ANSI escape sequences to the terminal. Without some sort of integration, IPython will assume it owns the whole screen and trample over the output lovingly created by Urwid. IPython can be taught to respect other UI toolkits, as evidenced by
ptipython
(that's prompt-toolkit-ipython). I don't know exactly how much work is involved to do that, but that might be a good place to look for an example of how to teach ipyth…