[python-win32] 'transparently' open file
sdahlbac at abo.fi
sdahlbac at abo.fi
Mon Jul 19 14:24:35 CEST 2004
How do I open a file "transparently" (whatever the correct term would
be), that is so that subsequent (and previous) processes can do whatever
they want with the file (read/write/delete..)
Basically I just want to monitor a log file, but if I open it plain
open('myfile', 'r') the RotatingFileHandler in the logging module
crashes on me with a permission error when it tries to rotate the logs.
I'm assuming I'll have to do some win32 specific black magic to make it
work. Presumably using FILE_SHARE_READ | FILE_SHARE_WRITE |
FILE_SHARE_DELETE if I was to use win api CreateFile.
solutions, pointers, hints would be appreciated.
/Simon
platform is winxp, python2.3
More information about the Python-win32
mailing list