Module: frontend.wx.console_widget

Inheritance diagram for IPython.frontend.wx.console_widget:

A Wx widget to act as a console and input commands.

This widget deals with prompts and provides an edit buffer restricted to after the last prompt.


class IPython.frontend.wx.console_widget.ConsoleWidget(parent, id=-1, pos=wx.Point(-1, -1), size=wx.Size(-1, -1), style=262144)


Specialized styled text control view for console-like workflow.

This widget is mainly interested in dealing with the prompt and keeping the cursor inside the editing line.

__init__(parent, id=-1, pos=wx.Point(-1, -1), size=wx.Size(-1, -1), style=262144)
Override the OnUpdateUI of the EditWindow class, to prevent syntax highlighting both for faster redraw, and for more consistent look and feel.
Set up all the styling option of the embedded scintilla widget.
Returns the current continuation prompt. We need to implement this method here to deal with the ascii escape sequences cleaning up.
Return the width of the line in characters.
Returns the text in current edit buffer.

Prints a prompt at start of line, and move the start of the current block there.

The prompt can be given with ascii escape sequences.

pop_completion(possibilities, offset=0)
Pops up an autocompletion menu. Offset is the offset in characters of the position at which the menu should appear, relativ to the cursor.
write(text, refresh=True)
Write given text to buffer, while translating the ansi escape sequences.