Detect file is locked - windows
Mark Lawrence
breamoreboy at yahoo.co.uk
Tue Nov 13 20:14:59 EST 2012
On 14/11/2012 00:33, Ali Akhavan wrote:
> I am trying to open a file in 'w' mode open('file', 'wb'). open() will throw with IOError with errno 13 if the file is locked by another application or if user does not have permission to open/write to the file.
>
> How can I distinguish these two cases ? Namely, if some application has the file open or not.
>
> Thanks,
> nomadali
>
Anything here help http://www.python.org/dev/peps/pep-3151/ ?
--
Cheers.
Mark Lawrence.
More information about the Python-list
mailing list