Newbie Q: File accessing
Peter Hansen
peter at engcorp.com
Wed Jun 19 19:41:31 EDT 2002
Todd Harris wrote:
>
> For those of you who use Microsoft <gulp...flame shield on> Word, when a
> document is opened by one user, and another user tries to access it, they
> can open it for read only. Obviously, Word has made some file attribute
> where it is locked to that first user, and only that first user can write to
> it while they have it open. Is there a way to do this in Python? Or what
> other possible options do I have? I've looked been using the open(
> filePath ) function as well as the os.open( ) function and os.access( ) to
> check my progress, but can't seem to figure out how to get around this.
> Thanks,
Possibly msvcrt.locking() for an MS-only solution... no idea how it
works, but the docs give you a bit of a start...
-Peter
More information about the Python-list
mailing list