Package teamwork :: Package shell :: Module TerminalShell :: Class TerminalShell
[hide private]
[frames] | no frames]

Class TerminalShell

source code

PsychShell.PsychShell --+
                        |
                       TerminalShell
Known Subclasses:

An interactive terminal version of the base PsychShell class.

Instance Methods [hide private]
 
__init__(self, entities=None, classes=None, agentClass=None, multiagentClass=None, file=None, progress=None, debug=0, compileDynamics=True, compilePolicies=None)
Almost identical to the base PsychShell constructor
source code
 
createEntities(self)
Interactive creation of entities for initial scenario
source code
str
getCommand(self)
Terminal version of command entry.
source code
 
displayResult(self, cmd, result)
Terminal version of the output display method.
source code

Inherited from PsychShell.PsychShell: __act__, __search__, applyPolicy, distill, doActions, execute, executeCommand, export, getBelief, getEntities, getEntity, goals, handleMsg, handleSusceptibility, help, initEntities, iterateModels, load, loadSociety, mainloop, performAct, querySusceptibility, resetSociety, revert, save, saveSociety, search, send, setDebugLevel, setModel, setupEntities, setupScenario, setupSusceptibility, step, stop, test, undo

Class Variables [hide private]

Inherited from PsychShell.PsychShell: __KQML__, __UNDO__, __VERSION__, actionFormat

Instance Variables [hide private]

Inherited from PsychShell.PsychShell: agentClass, multiagentClass

Method Details [hide private]

__init__(self, entities=None, classes=None, agentClass=None, multiagentClass=None, file=None, progress=None, debug=0, compileDynamics=True, compilePolicies=None)
(Constructor)

source code 

Almost identical to the base PsychShell constructor

Parameters:
  • file (str) - an input stream for reading commands. If none is provided, this stream defaults to standard input.
Overrides: PsychShell.PsychShell.__init__

getCommand(self)

source code 

Terminal version of command entry. Prints a prompt (currently assumes turn-based execution) and reads the command entry from the input file.

Returns: str
Overrides: PsychShell.PsychShell.getCommand

displayResult(self, cmd, result)

source code 

Terminal version of the output display method. Uses standard output.

Parameters:
  • cmd - the command executed
  • result - the results of the command
Overrides: PsychShell.PsychShell.displayResult