update

Home

1 IDLE 3

Comes with all python versions, built in.

2 IDLE shell/interpreter

Default screen that opens when you run IDLE.

3 Editor

Once in IDLE, you can choose file new or file open in the menu to start editing a new (or existing) python program. The first time you run the program, it will ask you to save it.

3.1 Run

Once the program is run, you will see the output in the IDLE shell window. You can also "test"

first on python output colouring: The escape codes are entered right into the print statement.

print("\033[1;32;40m Bright Green \n")

The above ANSI escape code will set the text colour to bright green. The format is; \033[ Escape code, this is always the same 1 = Style, 1 for normal. 32 = Text colour, 32 for bright green. 40m = Background colour, 40 is for black.

This table shows some of the available formats;

TEXT COLOR CODE	 TEXT STYLE  CODE      BACKGROUND COLOR	CODE
Black	   30	 No effect   0	       Black	  40
Red	   31	 Bold	     1	       Red	  41
Green	   32	 Underline   2	       Green	  42
Yellow	   33	 Negative1   3	       Yellow	  43
Blue	   34	 Negative2   5	       Blue	  44
Purple	   35	 	     	       Purple	  45
Cyan	   36			       Cyan	  46
White	   37			       White	  47

colours are RGB so #ff0000 is red, #00ff00 is green, and #0000ff is blue #ff00ff is purple

Changing colour themes to a custom theme by editing config-highlight.def in /Users/zintis/.pyenv/versions/3.6.5/lib/python3.6/idlelib/

[IDLE emacsDark]
comment-foreground = #DD0000
console-foreground = #EE4D4D
error-foreground = #FFFFFF
hilite-background = #7E7E7E
string-foreground = #CC968D
stderr-background = #171717
stderr-foreground = #FFB3B3
console-background = #171717
hit-background = #EFEFEF
string-background = #171717
normal-background = #171717
hilite-foreground = #FFFFFF
keyword-foreground = #FF8000
error-background = #C86464
keyword-background = #171717
builtin-background = #171717
break-background = #808000
builtin-foreground = #B800FF
definition-foreground = #5E5EFF
stdout-foreground = #00D0DC
definition-background = #171717
normal-foreground = #0FD400
cursor-foreground = #FFD400
stdout-background = #171717
hit-foreground = #005090
comment-background = #171717    
break-foreground = #FFFF00

See the "RBG-emacs-theme-for-python.pages" document

3.2 Home