0

Hi,

I have an application which writes some data to a file (csv). Now there is python script which is to be invoked once the application writes to the file. The application cannot generate any indication of completion of the process.

I thought of opening that csv file and handling the error for opening a file which is already in use. But I tested that if i open a file, and try to open the same file in write mode using the python, it does not throw any error of locking etc.

Please let me know how can I handle this logic in python.

It will be a great help !!!

Regards,

2
Contributors
1
Reply
3
Views
7 Years
Discussion Span
Last Post by woooee
0

You can use "lsof" (list open files) but that gives a huge amount of data since it will list any and all system files, etc. as well.

The application cannot generate any indication of completion of the process.

Why not? That is the standard way of doing things. Processes are meant to be independent and were designed with that in mind. If you want inter-process communication you will have to design it in.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.