Package flumotion :: Package extern :: Package command :: Package command :: Module manholecmd :: Class CmdInterpreter
[hide private]

type CmdInterpreter

source code

 object --+    
          |    
Interpreter --+
              |
             CmdInterpreter

Interactive Interpreter with special output and Deferred support.

Aside from the features provided by code.InteractiveInterpreter, this class captures sys.stdout output and redirects it to the appropriate location (the Manhole protocol instance). It also treats Deferreds which reach the top-level specially: each is formatted to the user with a unique identifier and a new callback and errback added to it, each of which will format the unique identifier and the result with which the Deferred fires and then pass it on to the next participant in the callback chain.

Instance Methods [hide private]
 
__init__(self, handler, localss=None) source code
 
push(self, line)
This version of push returns a deferred that will fire when the command is done and the interpreter can show the next prompt.
source code
Class Variables [hide private]
  cmdClass = None
  _cmd = None
Method Details [hide private]

__init__(self, handler, localss=None)
(Constructor)

source code 
Overrides: Interpreter.__init__

push(self, line)

source code 

This version of push returns a deferred that will fire when the command is done and the interpreter can show the next prompt.

Overrides: Interpreter.push