[IPython-dev] Prefiltering input - where and how?
Sat Mar 12 12:45:27 CST 2011
Robert found that calling macros caused problems with my new history system,
and suggested that they be expanded by prefiltering, so that the translated
history stores the macro content each time it's called. My attempt to do
that is here:
However, I ran into trouble with the execution model - it seems to compile
the macro in "single" mode, so only the first line gets executed. So I
peered into the execution code, and ended up somewhat confused. I'm hoping
someone can clarify:
- How much preprocessing is (and should be) done by IPython.core.prefilter
- As far as I can see in the code, only a single line statement actually
gets passed to prefilter. Yet prefiltering still seems to be going on if I
enter a multiline block - and I'm not quite sure how
- Should prefiltering be in the frontend or the core? I'm guessing the core,
but there's some prefiltering code in the terminal frontend, although I
think it's dead, because:
- Why does TerminalInteractiveShell have two raw_input methods defined? I'm
guessing the first one is older code: can I delete it to simplify matters?
It's still there in version control if we need to refer to it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev