IPythonView class. More...
Inheritance diagram for visualizer.ipython_view.IPythonView:
Collaboration diagram for visualizer.ipython_view.IPythonView:Public Member Functions | |
| __init__ (self) | |
| onKeyPressExtend (self, event) | |
| Key press callback with plenty of shell goodness, like history, autocompletions, etc. | |
| raw_input (self, prompt="") | |
| Custom raw_input() replacement. | |
Public Member Functions inherited from visualizer.ipython_view.ConsoleView | |
| __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. | |
| 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 Member Functions inherited from visualizer.ipython_view.IterableIPShell | |
| __init__ (self, argv=[], user_ns=None, user_global_ns=None, cin=None, cout=None, cerr=None, input_func=None) | |
| Constructor for the IterableIPShell class. | |
| complete (self, line) | |
| Returns an auto completed line and/or possibilities for completion. | |
| execute (self) | |
| Executes the current line provided by the shell object. | |
| generatePrompt (self, is_continuation) | |
| Generate prompt depending on is_continuation value. | |
| historyBack (self) | |
| Provides one history command back. | |
| historyForward (self) | |
| Provides one history command forward. | |
| shell (self, cmd, verbose=0, debug=0, header="") | |
| Replacement method to allow shell commands without them blocking. | |
| updateNamespace (self, ns_dict) | |
| Add the current dictionary to the shell namespace. | |
Public Attributes | |
| cout = StringIO() | |
| cout | |
| int | history_pos = 0 |
| history list | |
| bool | interrupt = False |
| interrupt | |
Public Attributes inherited from visualizer.ipython_view.ConsoleView | |
| 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 | |
Public Attributes inherited from visualizer.ipython_view.IterableIPShell | |
| complete_sep = re.compile(r"[\s\{\}\[\]\(\)]") | |
| separators | |
| int | history_level = 0 |
| history level | |
| str | indent_spaces = "" |
| indent spaces | |
| IP = IPython.terminal.embed.InteractiveShellEmbed.instance(config=cfg, user_ns=user_ns) | |
| IP. | |
| int | iter_more = 0 |
| iterate more | |
| list | lines = [] |
| lines | |
| no_input_splitter = Version("5.8.0") | |
| no input splitter | |
| prompt = self.generatePrompt(self.iter_more) | |
| prompt | |
Protected Member Functions | |
| _processLine (self) | |
| Process current command line. | |
Protected Member Functions inherited from visualizer.ipython_view.ConsoleView | |
| _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 Member Functions inherited from visualizer.ipython_view.IterableIPShell | |
| _getHistory (self) | |
| Gets the command string of the current history level. | |
Additional Inherited Members | |
Static Public Attributes inherited from visualizer.ipython_view.ConsoleView | |
| dict | ANSI_COLORS |
| color list | |
Protected Attributes inherited from visualizer.ipython_view.ConsoleView | |
| _changeLine | |
| _changeLine function | |
| _showPrompt | |
| _showPrompt function | |
| _showReturned | |
| _showReturned function | |
| _write | |
| _write function | |
IPythonView class.
Definition at line 647 of file ipython_view.py.
| visualizer.ipython_view.IPythonView.__init__ | ( | self | ) |
Initialize. Redirect I/O to console.
Definition at line 667 of file ipython_view.py.
|
protected |
Process current command line.
Definition at line 727 of file ipython_view.py.
Referenced by onKeyPressExtend().
Here is the caller graph for this function:| visualizer.ipython_view.IPythonView.onKeyPressExtend | ( | self, | |
| event ) |
Key press callback with plenty of shell goodness, like history, autocompletions, etc.
| event | Event object. |
Reimplemented from visualizer.ipython_view.ConsoleView.
Definition at line 692 of file ipython_view.py.
References _processLine(), visualizer.ipython_view.ConsoleView.changeLine(), visualizer.ipython_view.IterableIPShell.complete(), visualizer.ipython_view.ConsoleView.getCurrentLine(), visualizer.ipython_view.IterableIPShell.historyBack(), visualizer.ipython_view.IterableIPShell.historyForward(), interrupt, visualizer.ipython_view.IterableIPShell.prompt, visualizer.ipython_view.ConsoleView.showPrompt(), and visualizer.ipython_view.ConsoleView.write().
Here is the call graph for this function:| visualizer.ipython_view.IPythonView.raw_input | ( | self, | |
| prompt = "" ) |
Custom raw_input() replacement.
Gets current line from console buffer.
| prompt | Prompt to print. Here for compatibility as replacement. |
Definition at line 680 of file ipython_view.py.
References visualizer.ipython_view.ConsoleView.getCurrentLine(), and interrupt.
Here is the call graph for this function:| visualizer.ipython_view.IPythonView.cout = StringIO() |
cout
Definition at line 672 of file ipython_view.py.
| int visualizer.ipython_view.IPythonView.history_pos = 0 |
history list
Definition at line 732 of file ipython_view.py.
| bool visualizer.ipython_view.IPythonView.interrupt = False |
interrupt
Definition at line 674 of file ipython_view.py.
Referenced by onKeyPressExtend(), and raw_input().