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

Class EEConsole

      object --+    
               |    
     ConsoleBase --+
                   |
      object --+   |
               |   |
eeoptions.EEShow --+
                   |
                  EEConsole
Known Subclasses:

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, langlet, name, locals=None, globals=None, use_new_prompt=True, source_filter=<function <lambda> at 0x01074230>, **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 langlet expr/statement into one or more Python statements.
 
try_parse(self)
Parses eventually incomplete langlet statement.

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

Inherited from eeoptions.EEShow: maybe_grammar_check, maybe_show_cst_after, maybe_show_cst_before, maybe_show_python, maybe_show_scan, maybe_show_token

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

Class Methods [hide private]

Inherited from eeoptions.EEShow: show_tokenstream

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, langlet, name, locals=None, globals=None, use_new_prompt=True, source_filter=<function <lambda> at 0x01074230>, **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.

Overrides: ConsoleBase.at_start

at_exit(self)

 

reset default prompt

Overrides: ConsoleBase.at_exit

compile_cst(self, parseTree)

 

Transforms langlet expr/statement into one or more Python statements. Compile and execute those statements.

Parameters:
  • parseTree - langlet cst
Overrides: ConsoleBase.compile_cst

try_parse(self)

 

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

Overrides: ConsoleBase.try_parse