Editing File
akameswaran at gmail.com
akameswaran at gmail.com
Wed Jul 12 10:40:28 EDT 2006
D wrote:
> Hi, I currently have a Python app with a Tkinter GUI frontend that I
> use for system administration. Everytime it launches, it reads a text
> file which contains info about each host I wish to monitor - each field
> (such as IP, hostname, etc.) is delimited by !!. Now, I want to be
> able to edit host information from within the GUI - what would be the
> best way to go about this? Basically I just need to either edit the
> original host line, or write a new host line and delete the
> original..thanks!
Might be overkill - but pickle the data memeber that contains the
information. If you use text instead of binary pickling it should
still be editable by hand. for a single line of text it may be a bit
much - but it's still probably quicker than opening a file, parsing
etc.
More information about the Python-list
mailing list