A Discrete-Event Network Simulator
API
visualizer.ipython_view.IterableIPShell Class Reference

IterableIPShell class. More...

+ Inheritance diagram for visualizer.ipython_view.IterableIPShell:

Public Member Functions

def __init__
 Initializer. More...
 
def complete (self, line)
 Returns an auto completed line and/or posibilities for completion. More...
 
def execute (self)
 Executes the current line provided by the shell object. More...
 
def generatePrompt (self, is_continuation)
 Generate prompt depending on is_continuation value. More...
 
def historyBack (self)
 Provides one history command back. More...
 
def historyForward (self)
 Provides one history command forward. More...
 
def shell
 Replacement method to allow shell commands without them blocking. More...
 
def updateNamespace (self, ns_dict)
 Add the current dictionary to the shell namespace. More...
 

Public Attributes

 complete_sep
 separators More...
 
 history_level
 history level More...
 
 IP
 IP. More...
 
 iter_more
 iterate more More...
 
 prompt
 prompt More...
 

Private Member Functions

def __update_namespace (self)
 Update self.IP namespace for autocompletion with sys.modules. More...
 
def _getHistory (self)
 Get's the command string of the current history level. More...
 

Detailed Description

IterableIPShell class.

Definition at line 34 of file ipython_view.py.

Constructor & Destructor Documentation

def visualizer.ipython_view.IterableIPShell.__init__ (   self,
  argv = None,
  user_ns = None,
  user_global_ns = None,
  cin = None,
  cout = None,
  cerr = None,
  input_func = None 
)

Initializer.

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()
Returns
none

Definition at line 75 of file ipython_view.py.

Member Function Documentation

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

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

Definition at line 148 of file ipython_view.py.

References list.

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

Get's the command string of the current history level.

Parameters
selfthis object
Returns
: Historic command string.

Definition at line 253 of file ipython_view.py.

References visualizer.ipython_view.IterableIPShell.history_level.

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

+ Here is the caller graph for this function:

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

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

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

Definition at line 275 of file ipython_view.py.

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

+ Here is the caller graph for this function:

def visualizer.ipython_view.IterableIPShell.execute (   self)

Executes the current line provided by the shell object.

Definition at line 156 of file ipython_view.py.

References visualizer.ipython_view.IterableIPShell.history_level.

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 207 of file ipython_view.py.

def visualizer.ipython_view.IterableIPShell.historyBack (   self)

Provides one history command back.

Parameters
selfthis object
Returns
: The command string.

Definition at line 230 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:

def visualizer.ipython_view.IterableIPShell.historyForward (   self)

Provides one history command forward.

Parameters
selfthis object
Returns
: The command string.

Definition at line 242 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:

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 311 of file ipython_view.py.

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 266 of file ipython_view.py.

Member Data Documentation

visualizer.ipython_view.IterableIPShell.complete_sep

separators

Definition at line 140 of file ipython_view.py.

visualizer.ipython_view.IterableIPShell.IP

IP.

Definition at line 122 of file ipython_view.py.

visualizer.ipython_view.IterableIPShell.iter_more

iterate more

Definition at line 138 of file ipython_view.py.

visualizer.ipython_view.IterableIPShell.prompt

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