change the state of the tkinter `text` widget to read only i.e. `disabled`,text.config(state=DISABLED)