[IPython-user] Prompt expressions

Ville Vainio vivainio at gmail.com
Wed Jun 21 08:13:18 CDT 2006

On 6/16/06, Michael Scarpa <m.scarpa at uva.nl> wrote:

> Looks nice, but since it's all moving to hooks anyway:  The reason why I
> am using prompt expressions is that I have a function that I want to be
> executed every time *after* the execution of the last input.  Since
> IPython outputs the input-prompt after the execution, I simply tucked my
> function call into the prompt.  Now, is there (or is there going to be)
> a hook to do this in a more elegant way than re-implementing the
> standard IPython input-prompt-hook with the added function call?  In the
> end I don't need to change the prompt, but tho have my function be
> called after the processing of the last user input.

Any ideas how it could be most useful? I figure we could have
input_postfilter or something, but it would be too close to
result_display hook (that already exists) for my taste...

Any other opinions?

Ville Vainio - vivainio.googlepages.com
vainio.blogspot.com - g[mail | talk]='vivainio'

More information about the IPython-user mailing list