wait until change

Tom llafba_NOSPAM_ at gmx.net
Fri Oct 17 12:35:12 EDT 2003


Hi,

I have the following problem. I analyse data from a file. When I am done 
analysing all the data that was in that file, I want to let my program 
wait until this specific file has changed (which indicates that new data 
has been added to the file from a third party program that I don't 
control). If that file has changed, I want my program to continue.

What would be the appropriate command to check if the file changed? And 
how can I implement "wait until" into my program? I googled a lot to 
find any hints, but couldn't find anything helpful. But I found 
something about a python that was stabbed in NY in 2000. :-) Thought 
that was funny. :-)

I would deeply appreciate, if you could maybe include some little 
fragments of code to show me how to use your suggestions. I am 
relatively new to python and I often have problems with Pythons Library 
Reference, because it doesn't show examples and is very technically. 
That makes it difficult for me to really understand that. It also would 
be great, if you could tell me which modules I have to include. I hope 
all that is not asked too much. I assume that both problems can be 
solved with a few easy lines of code. I just don't know them. :-)

Thanks a lot for your help and suggestions.
Regards Tom





More information about the Python-list mailing list