Package EasyExtend :: Module eeconsole :: Class EEConsole
[hide private]
[frames] | no frames]

Class EEConsole



     object --+    
              |    
    ConsoleBase --+
                  |
     object --+   |
              |   |
eecommon.EEShow --+
                  |
                 EEConsole
Known Subclasses:
EERecordedConsole, EEReplayConsole

Console object used to handle user input.

This console object is to some extend a redesign of the InteractiveConsole object of the stdlib.

Instance Methods [hide private]
 
__init__(self, fiber, name, locals=None, globals=None, use_new_prompt=True, source_filter=<function <lambda> at 0x00DA7670>, **kwd)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
at_start(self)
Method used at console start.
 
at_exit(self)
reset default prompt
 
compile_cst(self, parseTree)
Transforms fiber expr/statement into one or more Python statements.
 
try_parse(self)
Parses eventually incomplete fiber statement.

Inherited from ConsoleBase: input, interact, reset, runcode, showtraceback, write

Inherited from eecommon.EEShow: maybe_show_cst_after, maybe_show_cst_before, maybe_show_python, maybe_show_token

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, fiber, name, locals=None, globals=None, use_new_prompt=True, source_filter=<function <lambda> at 0x00DA7670>, **kwd)
(Constructor)

 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

at_start(self)

 
Method used at console start. Select right prompt and print header.

at_exit(self)

 
reset default prompt
Overrides: ConsoleBase.at_exit

compile_cst(self, parseTree)

 
Transforms fiber expr/statement into one or more Python statements. Compile and execute those statements.
Parameters:
  • parseTree - fiber cst
Overrides: ConsoleBase.compile_cst

try_parse(self)

 
Parses eventually incomplete fiber statement. Following actions are possible: 1) Complete fiber statement could be parsed. Parse tree is returned. 2) Fiber statement incomplete. Needs more user input. Nothing is returned. 3) Syntax error detected within fiber statement. SyntaxError exception is raised.
Overrides: ConsoleBase.try_parse