How to set specific color for certain symbols like ,#,etc ' example if I type "" it's color should be blue and other stay remain same.
typedecker sir i am binding you function like this but this is not working
from tkinter import*
root = Tk()
def check_for_symbols(symbol_dict) :for i in symbol_dict :text.tag_remove(i, '1.0', END)pos = 1.0while 1:pos = text.search(i, pos, regexp = True, stopindex = END)if not pos:breaklast_pos = '%s+%dc' % (pos, len(i)) # The only changetext.tag_add(i, pos, last_pos)pos = last_postext.tag_config(i, foreground = symbol_dict[i])root.after(1000, lambda:check_for_symbols(symbol_dict))return
symbol_dict = {"*":"blue"
}
text = Text(root, background = "gray19", foreground = "white", insertbackground = 'white',font="Consolas 15 italic")
text.pack(expand=True,fill=BOTH)
root.after(1000, lambda : check_for_symbols(symbol_dict))
root.mainloop()