[Tutor] creating a text widget
Alan Gauld
alan.gauld at btinternet.com
Thu Jan 13 20:35:08 CET 2011
"W S" <wynnstinson at rocketmail.com> wrote
> could someone please provide me some code that would
> create a text widget that i could open a text file in?
You don;t open the text file in the widget as such, you open
the file in Python as usual and copy its contents into the
text widget.
When you are done making changes (if you are making
changes) then you have to copy the content back out
to the file (or rename the original to .bak and create
a new version)
So the question is which part do you not understand?
- Creating a text widget
- opening the file
- copying the file to the widget
- copying changes to the file
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list