[IPython-user] Hooking into the autocall displayer
Mon Sep 17 11:39:39 CDT 2007
On 9/17/07, Tom Denniston <email@example.com> wrote:
> Thanks Fernando.
> It seems to work fine in a perhaps hacky way if I simply call it
> through the display hook:
> On linux it works great:
> In : sys.displayhook.prompt1.write(sys.displayhook.prompt1.auto_rewrite()
> + 'mystring\n')
> ------> mystring
> Out: ''
> Green arrow and everything!
> On windows however, the escape sequences do not get properly interpretted:
> In : sys.displayhook.prompt1.write(sys.displayhook.prompt1.auto_rewrite() +
> ←[0;32m-------> ←[0mMyString
> Out: ''
> Do I need to do something different on windows?
It's best to keep your replies on-list, so others can also help.
In particular, in this case I don't really know what the problem is on
Win32, since I know very little about the handling of color escapes on
that platform. I hope our resident win32 experts may be able to help.
More information about the IPython-user