[Tutor] Saving Entry fields in Tkinter
kabads at gmail.com
Tue Mar 1 10:22:06 CET 2005
I'm writing an application which has rows of Entry fields (created in
a loop - see previous thread; and thanks guys!). All the content of
the Entry fields are accessed through self.contentlist[i].get()
Now I'm trying to save the content of those fields in a friendly
format. I've used pickle in the past, but experienced problems with
pickling Tkinter widgets.
I'm saving using this method :-
for i in self.contentlist:
saving = i.get() + "\n"
which creates a text file with each entry field separated with a "\n".
What would be a good way to open this file and re-populate the entry
fields with the content? I'm not sure how to parse the text according
to the \n separator.
Am I going down the right path here?
PGP key: 0x7111B833
More information about the Tutor