On Mon, 04 Aug 2014 17:43:41 +0200, Wolfgang Maier wrote: >> I'm not starting from scratch. I'm using packages 'termcolor', 'colorama' >> and 'colorconsole' - they provide functions to print text at desired >> position on screen, and change color of foreground/background of this text. > > Thanks for pointing out these packages! Since you say you're using all > three of them: where do colorama and colorconsole differ. From a quick > look, I can see that termcolor is a bit different, but colorama and > colorconsole seem pretty similar in scope.
From colorama I just use one function - init(). Without this initialization all those ansii escape characters (used by colorama itself, but also by termcolor.colored()) don't work in cmd.exe. At least I couldn't make it work. All coloring work I make in termcolor.colored() function, because it returns string, which I can work on (store and/or send it to print_at() function later). And colorconsole is helpful with its screen.print_at() function [where screen = colorconsole.terminal.get_terminal()]. So, yes, it's matter of (probably bad) design, but now I need all three packages. Maybe if I resign from storing my colored strings, and color them just while sending them to printing function, I could get rid of colorama and termcolor... Well, thanks for asking, because now, during writing this response, I see that maybe redesign is worth of trying... Wiktor -- Best regards, Wiktor Matuszewski 'py{}@wu{}em.pl'.format('wkm', 'ka') -- https://mail.python.org/mailman/listinfo/python-list