Extensions for tkinter.Text (provides read-only, scrollbars, line numbers etc)
Module tktextext provides classes EnhancedText and TextFrame.
EnhancedText is subclass of tkinter.Text and adds
possibility to make text read-only but keep text selectable
several movement and editing aids (smart-tab, smart-home, etc)
several useful helper methods.
TextFrame is subclass of tkinter.ttk.Frame and can decorate TextFrame (or tkinter.Text) with scrollbars and line numbers margin.
The module was initially developed for Thonny, Python IDE for beginners
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.