On Tue, Nov 26, 2013 at 7:17 PM, Walter Prins <[email protected]> wrote: > Actually now that I write this -- I suddenly vaguely remembering installing > PyReadline back when I was setting up IPython in order to get colour and a > couple of other things working properly... so presumably it does the ANSI > interpretation, and that's probably where the colourization is coming from, > perhaps this is what the OP has missing then? > > PyReadline on PyPi: https://pypi.python.org/pypi/pyreadline/2.0
That's the ticket. PyReadline has a console subpackage that uses ctypes to access the Windows console API. The AnsiWriter class splits the string into chunks with a given character attribute state (i.e. color, bold, reverse) to be set by SetConsoleTextAttribute before writing the chunk to the console. https://github.com/pyreadline/pyreadline/tree/master/pyreadline/console _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
