[IPython-user] Prompt expressions

Walter Dörwald walter at livinglogic.de
Wed Jun 21 09:43:28 CDT 2006


Ville Vainio wrote:
> On 6/21/06, Walter Dörwald <walter at livinglogic.de> wrote:
> 
>> A difference between the result_display hook and the input_postfilter
>> might be that for the result_display hook the first hook that handles
>> the object cancel further processing. For the input_postfilter handlers
>> further down the chain might want to process the object too.
> 
> 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.

Servus,
   Walter




More information about the IPython-user mailing list