> On Mar 5, 2020, at 5:42 AM, Robin Becker <ro...@reportlab.com> wrote:
>
>
> [EXTERNAL EMAIL]
> I want to be able to read a windows file which is being periodically written
> by another process. I created a small extension ...
>
> that seems to work, but I wonder if there's an easier pure python way to do
> this. Looking at the docs I see O_EXCL, but the _SH_DENY flags seem to be
> absent.
If the _fsopen function is present then you might try passing the numeric value
of those flags. If the real issue is the lack of a Python wrapper around
_fsopen, look at the ctypes module. That offers a simple way to wrap existing
shared library (DLL) APIs to make them visible as Python functions, without the
need to write your own extension modules. The documentation for ctypes in the
Python library manual is quite good, and includes Windows specific examples.
paul
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32