[IPython-user] Hooking into the autocall displayer

Tom Denniston tom.denniston@alum.dartmouth....
Sun Sep 16 17:59:19 CDT 2007

When I use autocall in IPython one of the awesome things about it, is
that it prints this green ------> with what it translated my code to.
For example:

In [1]: map str, [1,2,3]
------> map(str, [1,2,3])
Out[1]: ['1', '2', '3']

I wanted to hook into the function that does this printing because I
have some custom translations taht i do using the result_display hook.
 I print -------> plus my translation but then I end up with a line
that is:

Out[1]: -------> my translated result

What i really want is
------> my translated result

I could do it myself with some messy teminal escape sequence
manipulation but it would be much cleaner if it is possible to call
the function that IPython is using.

Does anyone have any idea how to do this?


More information about the IPython-user mailing list