Best way to save the contents and configuration of a tk.Text widget?

59 Views Asked by At

I have a tkinter Text widget that contains text, tags, and some tkinter Labels.

Is it possible to take the current configuration of this Text widget T, save it to a file, and destroy T, then later start a new instance of a Text widget t, load the saved contents of T into t so that t now appears the same as T did before it was destroyed?

1

There are 1 best solutions below

0
On

Yes, it is possible. The text widget has a method named dump which returns Information about all text and tags.