[IPython-user] Prompt expressions

Ville Vainio vivainio at gmail.com
Thu Jun 22 01:47:31 CDT 2006

On 6/21/06, Walter Dörwald <walter at livinglogic.de> wrote:

> > But it can always raise TryNext after doing the processing, i.e. doing
> > something doesn't necessarily indicate all is said and done.
> Yes, but a normal result_display hook wouldn't do that, because normally
> you don't want to output something twice. So if you register your
> input_postfilter hook as a result_display hook (because e.g. you want to
> send each result to an IRC channel in addition to outputting it in the
> terminal), and someone registered a normal result_display hook
> afterwards, that this result_display hook would eat the chain call.

You'd have to consider the priority carefully - perhaps there could be
some "recommended" priority range where all result_display hooks would
raise TryNext, thus ensuring that hooks that actually display the data
would always be run.

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

More information about the IPython-user mailing list