"Robert Jackson" <[EMAIL PROTECTED]> wrote > I'm trying to get some pretty colored output for a Linux console > / terminal window. Google searches only reveal the curses module > to colorize output.
curses means it will work for any console supporting color and curses. > Is there a simpler way? Curses seems to be FAR too powerful If you know for sure what terminal you are using then you can send control codes to the screen directly. But since color terninals are far from standard you will need to find out what kind of terminal you are using (eg Dec VT340 supports color as do various Tectronics and Wyse terminals). On Linux you are probably using a terminal emulator running in an xterm or some other window interface. Xterm uses the terminal settings you tell it to use in the X resources. But some more modern consoles have their own codes so you need to look them up. In short if you know the control codes used to change color then it's easy to print them out. Something like: # These codes are just made up, you need the real ones! YELLOW = 0x23 BLUE = 0x4A RED = 0xB2 print YELLOW, 'This is yellow', RED, 'and this is red' But that will produce something completely different in another console type. HTH, -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor