how to detect if a dictionary has been modified ?

Stef Mientki stef.mientki at gmail.com
Sun Nov 23 04:10:50 EST 2008


hello,

Just like in a normal text editor,
I would like to detect if a dictionary has been changed.
So I would like to have a modified-flag.
(This dictionary is used as a communication channel between processes)

Now I do it to make a copy of the dictionary and compare it with the old 
one.
When a change is detected I nake a new copy and interpret the whole new 
dictionary again,
so I'm not interested in knowing where the change(s) are located.
This works well, but as I have many of these dictionaries,
I find the copy a waste of time and space.

Has anyone derived a new dictionary with a modified flag ?
Or are there other solutions to detect easily a directory change ?

thanks,
Stef Mientki



More information about the Python-list mailing list