Package Camelot :: Package camelot :: Package bin :: Module camelot_manage :: Class Shell
[frames] | no frames]

Class Shell

source code


Wrapper around Python that can filter input/output to the shell
Instance Methods
 
__init__(self, locals={})
Constructor.
source code
 
get_output(self) source code
 
return_output(self) source code
 
push(self, line)
Push a line to the interpreter.
source code

Inherited from code.InteractiveConsole: interact, raw_input, resetbuffer

Inherited from code.InteractiveInterpreter: runcode, runsource, showsyntaxerror, showtraceback, write

Method Details

__init__(self, locals={})
(Constructor)

source code 

Constructor.

The optional locals argument will be passed to the InteractiveInterpreter base class.

The optional filename argument should specify the (file)name of the input stream; it will show up in tracebacks.

Overrides: code.InteractiveInterpreter.__init__
(inherited documentation)

push(self, line)

source code 

Push a line to the interpreter.

The line should not have a trailing newline; it may have internal newlines. The line is appended to a buffer and the interpreter's runsource() method is called with the concatenated contents of the buffer as source. If this indicates that the command was executed or invalid, the buffer is reset; otherwise, the command is incomplete, and the buffer is left as it was after the line was appended. The return value is 1 if more input is required, 0 if the line was dealt with in some way (this is the same as runsource()).

Overrides: code.InteractiveConsole.push
(inherited documentation)