Could you first find out if it exists with isfile(..) and then try to
open it? If it fails I *think*
it would have to be open by another process.
-Rick King
Southfield MI
bvidinli wrote:
i started python programming a few months ago.
now i need the code to understand if a file already o
* i do not want to prevent other process access same file, i only
want if a file being used as i acess it.
* i am not interested if a process will access same file just after i
access it... because in my case, this is not possible..
* i want some other way, other than linux lsof command. it is s
bvidinli wrote:
> i started python programming a few months ago.
>
> now i need the code to understand if a file already opened in
> filesystem by another process ?
>
> i looked at docs, howtos, but did not find related info.
> note that normal file open/write operations in python, i know it.
>
bvidinli wrote:
> this is for ensuring that file is not in use, ...
> by any process in system
How do you prevent the other processes that *might* access that file from
doing so while *you* work on it? unless they cooperate using file-locks,
you might end up with garbage.
Diez
--
http://ma
The need/reason for this,
i write a program that should perform some operation on files, only if
the file is not being used
this is for ensuring that file is not in use, ...
by any process in system
10.04.2008 tarihinde bvidinli <[EMAIL PROTECTED]> yazmış:
> Sory for lack of information
Sory for lack of information,
i use linux/unix
i need to solve this for linux/unix
i tested os.open with O_EXCL flag, and some other things, that did not solve.
i need exacly: say example file testfile,
check if testfile already open by some other process in linux,
tahnks.
2008/4/10, G
bvidinli wrote:
> i started python programming a few months ago.
>
> now i need the code to understand if a file already opened in
> filesystem by another process ?
>
> i looked at docs, howtos, but did not find related info.
> note that normal file open/write operations in python, i know it.
>
En Thu, 10 Apr 2008 05:11:09 -0300, bvidinli <[EMAIL PROTECTED]> escribió:
> i started python programming a few months ago.
>
> now i need the code to understand if a file already opened in
> filesystem by another process ?
>
> i looked at docs, howtos, but did not find related info.
> note that n
bvidinli wrote:
> i started python programming a few months ago.
>
> now i need the code to understand if a file already opened in
> filesystem by another process ?
>
> i looked at docs, howtos, but did not find related info.
> note that normal file open/write operations in python, i know it.
>
> i
i started python programming a few months ago.
now i need the code to understand if a file already opened in
filesystem by another process ?
i looked at docs, howtos, but did not find related info.
note that normal file open/write operations in python, i know it.
i specificly need to know that "
10 matches
Mail list logo