Danny and Hugo,Thanks that really explains it better on what was going on. I may try renaming the file to see if I can get around it that way. -- Pat Martin
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hi Pat,
> testfile = open('testlock', 'a+')
> fcntl.flock(mboxfile.fileno(), fcntl.LOCK_EX)
>
> in the interpreter and then try to access the file in another terminal
> (I leave the interpreter open) I can write to the file just fine with
> vi. So I am not thinking it is working. Unless I am mi
You could try setting up a seperate user and then changing permissions on the file so that only that user can access it then change it back when you've finished.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On Wed, 22 Feb 2006, Pat Martin wrote:
> I had actually looked at that site, but when I do the commands
>
> testfile = open('testlock', 'a+')
> fcntl.flock(mboxfile.fileno(), fcntl.LOCK_EX)
>
> in the interpreter and then try to access the file in another terminal
> (I leave the interpreter open
On 2/22/06, Pat Martin <[EMAIL PROTECTED]> wrote:
> I am trying to find on the web how to lock a file with python in Linux.
> I am trying to process a group of files that are continually being
> written to and when I am working on one file I would like to be able to> lock it. Can anyone point me in
> I am trying to find on the web how to lock a file with python in Linux.> I am trying to process a group of files that are continually being
> written to and when I am working on one file I would like to be able to> lock it. Can anyone point me in the right direction for that.Hi Pat,Take a look at
On Wed, 22 Feb 2006, Pat Martin wrote:
> I am trying to find on the web how to lock a file with python in Linux.
> I am trying to process a group of files that are continually being
> written to and when I am working on one file I would like to be able to
> lock it. Can anyone point me in the ri