[IPython-user] ipython1.frontend.input_state_manager questions

Jörgen Stenarson jorgen.stenarson@bostream...
Thu Apr 3 14:41:58 CDT 2008


Barry Wark skrev:
> 2. InputStateManager.process_key seems like it's going to get pretty
> hairy if we try to abstract all key events _plus_ all other type of
> input events that a frontend might use (such as mouse/gesture events
> (oh, come on, you can't tell me you haven't thought of an iPhone
> frontend for a distributed ipython1 cluster) etc.). Might it be more
> sane to implement methods for each type of _event_ in
> InputStateManager, such as, e.g.,
>   key_down(unicode character) #insert a character
>   history_navigation({up|down}) #move history
>   insert_newline #send block to engine if complete (return True/False
> to indicate sent to engine/continue)
>   complete #e.g. tab or esc (different frontends may have different
> completion gestures)
> 
This sounds a lot like what pyreadline is all about. I'd love to see it
become more useful as a component and not just as a readline replacement
in win32 consoles.

/Jörgen






More information about the IPython-user mailing list