[Idle-dev] (no subject)

Tal Einat taleinat at gmail.com
Sun Aug 24 08:39:36 CEST 2008

Mark Fenton wrote:
> Hi,
>   Tried your advise about using the "pythonw" configuration in the
> shortcut's properties, but sadly it didn't work, maybe it's because I'm
> using Pyhton24 which may make all the difference (not sure about this
> though).

Again, try this first in the command line; This worked for me:
C:\Python25\pythonw.exe -m idlelib.idle -r C:\hilo.py

> More success on the colourization line of code though it produced only one
> colour and that was red. ..., but I guess there's
> not much call for colouring strings (unless for warnings etc) in general
> Python work.

You're partially right, in the sense that IDLE does not support custom
colorized text output. The two colors you've found that you can use
are the colors IDLE uses to differentiate between stdout and stderr.

However, this is because IDLE is not meant to be used in this way.
IDLE is an interactive interpreter and code editor, but you're using
it as if it were a fancy shell with some GUI sprinkled on top.

Python itself does support colorized text output, as well as blinking
text and all sorts of other effects; IIRC the built-in 'curses' module
does some of this stuff. This will only work if you run the script
normally (i.e. in the black DOS window), though.

- Tal

More information about the IDLE-dev mailing list