ConsoleView class. More...
Inheritance diagram for visualizer.ipython_view.ConsoleView:
Collaboration diagram for visualizer.ipython_view.ConsoleView:Public Member Functions | |
| __init__ (self) | |
| changeLine (self, text) | |
| Replace currently entered command line with given text. | |
| getCurrentLine (self) | |
| Get text in current command line. | |
| onKeyPress (self, widget, event) | |
| Key press callback used for correcting behavior for console-like interfaces. | |
| onKeyPressExtend (self, event) | |
| For some reason we can't extend onKeyPress directly (bug #500900). | |
| showPrompt (self, prompt) | |
| Prints prompt at start of line. | |
| showReturned (self, text) | |
| Show returned text from last command and print new prompt. | |
| write (self, text, editable=False) | |
| Write given text to buffer. | |
Public Attributes | |
| color_pat = re.compile(r"\x01?\x1b\[(.*?)m\x02?") | |
| color pattern | |
| line_start | |
| line start | |
| mark | |
| scroll mark | |
| no_input_splitter | |
| no input splitter | |
| onKeyPress | |
| onKeyPress function | |
| prompt | |
| prompt function | |
| text_buffer = self.get_buffer() | |
| text buffer | |
Static Public Attributes | |
| dict | ANSI_COLORS |
| color list | |
Protected Member Functions | |
| _changeLine (self, text) | |
| Replace currently entered command line with given text. | |
| _showPrompt (self, prompt) | |
| Prints prompt at start of line. | |
| _showReturned (self, text) | |
| Show returned text from last command and print new prompt. | |
| _write (self, text, editable=False) | |
| Write given text to buffer. | |
Protected Attributes | |
| _changeLine | |
| _changeLine function | |
| _showPrompt | |
| _showPrompt function | |
| _showReturned | |
| _showReturned function | |
| _write | |
| _write function | |
ConsoleView class.
Definition at line 349 of file ipython_view.py.
| visualizer.ipython_view.ConsoleView.__init__ | ( | self | ) |
Initialize console view.
Definition at line 417 of file ipython_view.py.
|
protected |
Replace currently entered command line with given text.
| text | Text to use as replacement. |
Definition at line 511 of file ipython_view.py.
References _write, delete, line_start, and text_buffer.
|
protected |
Prints prompt at start of line.
| prompt | Prompt to print. |
Definition at line 492 of file ipython_view.py.
References _write, line_start, and text_buffer.
|
protected |
Show returned text from last command and print new prompt.
| text | Text to show. |
Definition at line 545 of file ipython_view.py.
References _write, line_start, and text_buffer.
|
protected |
Write given text to buffer.
| text | Text to append. |
| editable | If true, added text is editable. |
Definition at line 453 of file ipython_view.py.
References color_pat, mark, and text_buffer.
| visualizer.ipython_view.ConsoleView.changeLine | ( | self, | |
| text ) |
Replace currently entered command line with given text.
| text | Text to use as replacement. |
Definition at line 502 of file ipython_view.py.
Referenced by visualizer.ipython_view.IPythonView.onKeyPressExtend().
Here is the caller graph for this function:| visualizer.ipython_view.ConsoleView.getCurrentLine | ( | self | ) |
Get text in current command line.
Definition at line 523 of file ipython_view.py.
References line_start, and text_buffer.
Referenced by visualizer.ipython_view.IPythonView.onKeyPressExtend(), and visualizer.ipython_view.IPythonView.raw_input().
Here is the caller graph for this function:| visualizer.ipython_view.ConsoleView.onKeyPress | ( | self, | |
| widget, | |||
| event ) |
Key press callback used for correcting behavior for console-like interfaces.
For example 'home' should go to prompt, not to beginning of line.
| widget | Widget that key press accored in. |
| event | Event object |
Definition at line 571 of file ipython_view.py.
References delete, line_start, onKeyPressExtend(), prompt, visualizer.ipython_view.IterableIPShell.prompt, and text_buffer.
Here is the call graph for this function:| visualizer.ipython_view.ConsoleView.onKeyPressExtend | ( | self, | |
| event ) |
For some reason we can't extend onKeyPress directly (bug #500900).
| event | key press |
Reimplemented in visualizer.ipython_view.IPythonView.
Definition at line 637 of file ipython_view.py.
Referenced by onKeyPress().
Here is the caller graph for this function:| visualizer.ipython_view.ConsoleView.showPrompt | ( | self, | |
| prompt ) |
Prints prompt at start of line.
| prompt | Prompt to print. |
Definition at line 483 of file ipython_view.py.
Referenced by visualizer.ipython_view.IPythonView.onKeyPressExtend().
Here is the caller graph for this function:| visualizer.ipython_view.ConsoleView.showReturned | ( | self, | |
| text ) |
Show returned text from last command and print new prompt.
| text | Text to show. |
Definition at line 536 of file ipython_view.py.
| visualizer.ipython_view.ConsoleView.write | ( | self, | |
| text, | |||
| editable = False ) |
Write given text to buffer.
| text | Text to append. |
| editable | If true, added text is editable. |
Definition at line 443 of file ipython_view.py.
Referenced by visualizer.ipython_view.IPythonView.onKeyPressExtend().
Here is the caller graph for this function:
|
protected |
_changeLine function
Definition at line 509 of file ipython_view.py.
|
protected |
_showPrompt function
Definition at line 490 of file ipython_view.py.
|
protected |
_showReturned function
Definition at line 543 of file ipython_view.py.
|
protected |
_write function
Definition at line 451 of file ipython_view.py.
Referenced by _changeLine(), _showPrompt(), and _showReturned().
|
static |
color list
Definition at line 391 of file ipython_view.py.
| visualizer.ipython_view.ConsoleView.color_pat = re.compile(r"\x01?\x1b\[(.*?)m\x02?") |
| visualizer.ipython_view.ConsoleView.line_start |
line start
Definition at line 438 of file ipython_view.py.
Referenced by _changeLine(), _showPrompt(), _showReturned(), getCurrentLine(), and onKeyPress().
| visualizer.ipython_view.ConsoleView.mark |
scroll mark
Definition at line 425 of file ipython_view.py.
Referenced by _write().
| visualizer.ipython_view.ConsoleView.no_input_splitter |
no input splitter
Definition at line 565 of file ipython_view.py.
| visualizer.ipython_view.ConsoleView.onKeyPress |
onKeyPress function
Definition at line 441 of file ipython_view.py.
| visualizer.ipython_view.ConsoleView.prompt |
| visualizer.ipython_view.ConsoleView.text_buffer = self.get_buffer() |
text buffer
Definition at line 424 of file ipython_view.py.
Referenced by _changeLine(), _showPrompt(), _showReturned(), _write(), getCurrentLine(), and onKeyPress().