Using tk to create a text editor

yassin picture yassin · Feb 12, 2014 · Viewed 8.3k times · Source

Is it possible to use tk to create a text editor that can support syntax highlighting, autocomplete and even can be later extended to be an IDE for a specific language?

I found tkinter widget, but not sure if it can support that or not?

I think if a widget can do some processing on the text while the user is writing it, then it can used for this purpose.

Answer

Bryan Oakley picture Bryan Oakley · Feb 12, 2014

Absolutely. The tkinter text widget is remarkably powerful. Everything you mentioned can be done, and more. You can also implement code folding, embedded images, hyperlinks, undo, etc.

Here are some answers to related questions you might find helpful: