read data from file and display at tk entry
Posted by dee00zee (dee00zee), 11 July 2005I have one gui to ask user to input her name, passport number and address.
These information will be saved in a file called data
Later when she invoke the gui again, she wants to see the info that she entered before.
Is it possible for gui to read data from a file(data) and display the content at the right entries?
Any example how to do this?
Posted by admin (Graham Ellis), 12 July 2005Code:
This example takes the current name and number from a data file, lets the user modify them, and saves them back to the same file when the done button is clicked.
The file demo.txt needs to exist before you run the program for the first time, and contain two lines of data which will be used to "seed" the application.
Other Forum Posts
Follow us on ...
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: email@example.com • WEB: http://www.wellho.net • SKYPE: wellho