A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
visualizer.ipython_view.IterableIPShell Class Reference

IterableIPShell class. More...

+ Inheritance diagram for visualizer.ipython_view.IterableIPShell:

Public Member Functions

def __init__ (self, argv=[], user_ns=None, user_global_ns=None, cin=None, cout=None, cerr=None, input_func=None)
 Constructor for the IterableIPShell class.
 
def complete (self, line)
 Returns an auto completed line and/or possibilities for completion.
 
def execute (self)
 Executes the current line provided by the shell object.
 
def generatePrompt (self, is_continuation)
 Generate prompt depending on is_continuation value.
 
def historyBack (self)
 Provides one history command back.
 
def historyForward (self)
 Provides one history command forward.
 
def shell (self, cmd, verbose=0, debug=0, header="")
 Replacement method to allow shell commands without them blocking.
 
def updateNamespace (self, ns_dict)
 Add the current dictionary to the shell namespace.
 

Public Attributes

 complete_sep
 separators
 
 history_level
 history level
 
 indent_spaces
 indent spaces
 
 IP
 IP.
 
 iter_more
 iterate more
 
 lines
 lines
 
 no_input_splitter
 no input splitter
 
 prompt
 prompt
 

Protected Member Functions

def _getHistory (self)
 Gets the command string of the current history level.
 

Private Member Functions

def __update_namespace (self)
 Update self.IP namespace for autocompletion with sys.modules.
 

Detailed Description

IterableIPShell class.

Definition at line 39 of file ipython_view.py.

Constructor & Destructor Documentation

◆ __init__()

def 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.

Parameters
selfthis object
argvCommand line options for IPython
user_nsUser namespace.
user_global_nsUser global namespace.
cinConsole standard input.
coutConsole standard output.
cerrConsole standard error.
input_funcReplacement for builtin raw_input()

Reimplemented in visualizer.ipython_view.IPythonView.

Definition at line 65 of file ipython_view.py.

Member Function Documentation

◆ __update_namespace()

def visualizer.ipython_view.IterableIPShell.__update_namespace (   self)
private

Update self.IP namespace for autocompletion with sys.modules.

Returns
none

Definition at line 155 of file ipython_view.py.

References visualizer.ipython_view.IterableIPShell.IP, and list.

◆ _getHistory()

def visualizer.ipython_view.IterableIPShell._getHistory (   self)
protected

Gets the command string of the current history level.

Parameters
selfthis object
Returns
: Historic command string.

Definition at line 267 of file ipython_view.py.

References visualizer.ipython_view.IterableIPShell.history_level, and visualizer.ipython_view.IterableIPShell.IP.

Referenced by visualizer.ipython_view.IterableIPShell.historyBack(), and visualizer.ipython_view.IterableIPShell.historyForward().

+ Here is the caller graph for this function:

◆ complete()

def visualizer.ipython_view.IterableIPShell.complete (   self,
  line 
)

Returns an auto completed line and/or possibilities for completion.

Parameters
lineGiven line so far.
Returns
: Line completed as for as possible, and possible further completions.

Definition at line 289 of file ipython_view.py.

References visualizer.ipython_view.IterableIPShell.complete(), visualizer.ipython_view.IterableIPShell.complete_sep, and visualizer.ipython_view.IterableIPShell.IP.

Referenced by visualizer.ipython_view.IterableIPShell.complete(), and visualizer.ipython_view.IPythonView.onKeyPressExtend().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ execute()

def visualizer.ipython_view.IterableIPShell.execute (   self)

Executes the current line provided by the shell object.

Returns
none

Definition at line 164 of file ipython_view.py.

References visualizer.ipython_view.IterableIPShell.history_level.

◆ generatePrompt()

def visualizer.ipython_view.IterableIPShell.generatePrompt (   self,
  is_continuation 
)

Generate prompt depending on is_continuation value.

Parameters
is_continuation
Returns
: The prompt string representation

Definition at line 229 of file ipython_view.py.

◆ historyBack()

def visualizer.ipython_view.IterableIPShell.historyBack (   self)

Provides one history command back.

Parameters
selfthis object
Returns
: The command string.

Definition at line 244 of file ipython_view.py.

References visualizer.ipython_view.IterableIPShell._getHistory(), and visualizer.ipython_view.IterableIPShell.history_level.

Referenced by visualizer.ipython_view.IPythonView.onKeyPressExtend().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ historyForward()

def visualizer.ipython_view.IterableIPShell.historyForward (   self)

Provides one history command forward.

Parameters
selfthis object
Returns
: The command string.

Definition at line 256 of file ipython_view.py.

References visualizer.ipython_view.IterableIPShell._getHistory(), and visualizer.ipython_view.IterableIPShell.history_level.

Referenced by visualizer.ipython_view.IPythonView.onKeyPressExtend().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shell()

def visualizer.ipython_view.IterableIPShell.shell (   self,
  cmd,
  verbose = 0,
  debug = 0,
  header = "" 
)

Replacement method to allow shell commands without them blocking.

Parameters
cmdShell command to execute.
verboseVerbosity
debugDebug level
headerHeader to be printed before output
Returns
none

Definition at line 326 of file ipython_view.py.

◆ updateNamespace()

def visualizer.ipython_view.IterableIPShell.updateNamespace (   self,
  ns_dict 
)

Add the current dictionary to the shell namespace.

Parameters
ns_dictA dictionary of symbol-values.
Returns
none

Definition at line 280 of file ipython_view.py.

References visualizer.ipython_view.IterableIPShell.IP.

Member Data Documentation

◆ complete_sep

visualizer.ipython_view.IterableIPShell.complete_sep

separators

Definition at line 141 of file ipython_view.py.

Referenced by visualizer.ipython_view.IterableIPShell.complete().

◆ history_level

◆ indent_spaces

visualizer.ipython_view.IterableIPShell.indent_spaces

indent spaces

Definition at line 153 of file ipython_view.py.

Referenced by visualizer.ipython_view.ConsoleView._showReturned().

◆ IP

◆ iter_more

visualizer.ipython_view.IterableIPShell.iter_more

iterate more

Definition at line 139 of file ipython_view.py.

◆ lines

visualizer.ipython_view.IterableIPShell.lines

lines

Definition at line 152 of file ipython_view.py.

◆ no_input_splitter

visualizer.ipython_view.IterableIPShell.no_input_splitter

no input splitter

Definition at line 151 of file ipython_view.py.

Referenced by visualizer.ipython_view.ConsoleView._showReturned().

◆ prompt


The documentation for this class was generated from the following file: