Jan-21-2025, 08:30 PM
I think I've run into a problem with python locking files that were opened using open(). This happens one Windows 10
I am trying to pass information from a python application to a C# application via a shared file. When I open the file for writing in Python the C# application cannot open the file. When I close the file in Python the C# application can open and read the file. I know the problem is not flush() because I can see the size of the file change when the information is written (using the file browser) and I tried calling flush() after the write.
I think I can open an unlocked file using os.open() and os.fdopen() but I am having difficulty finding examples that run on Windows. I would be grateful for any links you can provide.
I am trying to pass information from a python application to a C# application via a shared file. When I open the file for writing in Python the C# application cannot open the file. When I close the file in Python the C# application can open and read the file. I know the problem is not flush() because I can see the size of the file change when the information is written (using the file browser) and I tried calling flush() after the write.
I think I can open an unlocked file using os.open() and os.fdopen() but I am having difficulty finding examples that run on Windows. I would be grateful for any links you can provide.