[IPython-dev] Auto-calling question
Dan Milstein
danmil at comcast.net
Mon Feb 26 14:33:58 EST 2007
One of my goals is very much to make the system play nicer with
extensions (and, hopefully, to put something in place so you can
insert your own rewriting phases into the middle of a coherent
rewrite sequence).
Actually, since you bring that up, I have a question about
input_prefilter:
As far as I can tell from the code, if you install an input_prefilter
hook, then, for each line:
If your hook changes the line at all, then IPython does no more
transformations (no magic, no autocall, etc)
If your hook runs but does *not* change the line, then IPython
*does* run it's usual transformations
a) Is that right?
b) Is that the desired behavior?
I can imagine situations where someone would like to add a modest
extension to IPython's transformations, but this forces you into an
all-or-nothing situation.
-D
On Feb 26, 2007, at 1:21 PM, Ville M. Vainio wrote:
> On 2/26/07, Dan Milstein <danmil at comcast.net> wrote:
>
>> I do have an idea for cleaning up all that prefilter code, so I'll
>> see if I can fix that all together once I get the tests up and
>> running.
>
> It would be groovy if it involved input_prefilter hook (see
> Extensions/jobctrl.py and ext_rescapture.py).
>
> --
> Ville M. Vainio - vivainio.googlepages.com
> blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'
More information about the IPython-dev
mailing list