
December 1st, 2003, 01:03 PM
|
 |
Contributing User
|
|
Join Date: Aug 2003
Location: Somewhere over the Rainbow
Posts: 128
Time spent in forums: 3 h 54 m 28 sec
Reputation Power: 10
|
|
|
Highlight words
Hi, I would like to know how can I Highlight words with specific colors in my Tkinter code? I guess I can use the tokenize module, Im making something like the below code. is that correct? or what can I do to Highlight words?
Thanks a lot.
Code:
import tokenize
import keyword
KEYWORD="Keyword"
TOKEN_START={tokenize.Word:"<font color=BLUE>",
tokenize.Word1:"<font color=RED>",
tokenizeWord2:"<font color=GREEN>",
Word3:"<font color=ORANGE>",
TOKEN_END={tokenize.Word::"</font>",
tokenize.Word1:"</font>",
tokenize.Word2:"</font>",
Word3:"</font>",
}
Last edited by Gerardoj : December 1st, 2003 at 01:10 PM.
|