[Tkinter-discuss] Taking a Text() widget and saving it to a .txt file
Cameron Laird
Cameron at phaseit.net
Fri Jul 4 02:57:14 CEST 2008
On Thu, Jul 03, 2008 at 04:16:23PM -0700, Alexnb wrote:
.
.
.
> I don't really know if this is possible, but it seems like there should be an
> easy way. If I have a text widget:
>
> text = Text(parent)
>
> and I want to take what is in there and save it has a text file. How would I
> go about doing this. Also, if it matters, I would like to keep it in the
> same format as the textbox.
.
.
.
You'll want to start by reading <URL:
http://www.pythonware.com/library/tkinter/introduction/x8369-methods.htm >,
and especially about get():
text.get("1.0", "end")
More information about the Tkinter-discuss
mailing list