Check file is locked?

Rajat rajat.dudeja at gmail.com
Wed Jul 8 00:31:12 EDT 2009


On Jul 8, 4:57 am, Lawrence D'Oliveiro <l... at geek-
central.gen.new_zealand> wrote:
> In message <mailman.2795.1246997268.8015.python-l... at python.org>, Christian
>
> Heimes wrote:
> > By the way most operating systems don't lock a file when it's opened for
> > reading or writing or even executed.
>
> The general conclusion seems to be that mandatory locking is more trouble
> than it's worth.

My OS is a windows XP sp3. All I'm trying to achieve is to close an
application ( which could be a notepad, a wordpad or some other text
editor) that have opened my file. Once the file is closed I can easily
delete that file.

I guess, if file is opened by one of that application, the file must
be locked and so is the reason I cannot delete the file.

Please suggest if this is fine.




More information about the Python-list mailing list