Snakey <darr_low <at> yahoo.com> writes: > > > I created a text widget to allow my users to enter some lines of text. Now I > need to dump all the text contents into a string variable. How can i do > that?
Supposing you have no tags, you could do: text.get('1.0', 'end') # text is your text widget The first parameter is the index1 specifying where to start looking for text, and the other parameter is the index2, where to stop looking for text (one before it). Lines are numbered from 1 and columns from 0, that is why I used '1.0' (which is accepted as an index), and 'end' is an special index which indicates the end of the text. _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss