Re: Exclusively lock a file to prevent other processes from reading it?

2010-05-05 Thread python
Chris, Philip, Christian, John and others, Thank you all for your replies. Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Exclusively lock a file to prevent other processes from reading it?

2010-05-04 Thread python
Is there a way to exclusively lock a file to prevent other processes from reading it while we have it open? I need to cache some overflow data to disk in a temp file and I want to make sure no other processes can read the contents of this file while I'm using it. I tried the following using

Re: Exclusively lock a file to prevent other processes from reading it?

2010-05-04 Thread Philip Semanchuk
On May 4, 2010, at 5:37 PM, pyt...@bdurham.com wrote: Is there a way to exclusively lock a file to prevent other processes from reading it while we have it open? I need to cache some overflow data to disk in a temp file and I want to make sure no other processes can read the contents

Re: Exclusively lock a file to prevent other processes from reading it?

2010-05-04 Thread Chris Rebert
On Tue, May 4, 2010 at 2:37 PM, pyt...@bdurham.com wrote: Is there a way to exclusively lock a file to prevent other processes from reading it while we have it open? I need to cache some overflow data to disk in a temp file and I want to make sure no other processes can read the contents

Re: Exclusively lock a file to prevent other processes from reading it?

2010-05-04 Thread Christian Heimes
pyt...@bdurham.com wrote: Is there a way to exclusively lock a file to prevent other processes from reading it while we have it open? I need to cache some overflow data to disk in a temp file and I want to make sure no other processes can read the contents of this file while I'm using it. I

Re: Exclusively lock a file to prevent other processes from reading it?

2010-05-04 Thread Nobody
On May 4, 2010, at 5:37 PM, pyt...@bdurham.com wrote: Is there a way to exclusively lock a file to prevent other processes from reading it while we have it open? My environment is Python 2.6.4 (32-bit) under Windows, but I'm looking for a cross-platform solution if that's possible. Some

Re: Exclusively lock a file to prevent other processes from reading it?

2010-05-04 Thread John Nagle
Philip Semanchuk wrote: On May 4, 2010, at 5:37 PM, pyt...@bdurham.com wrote: Is there a way to exclusively lock a file to prevent other processes from reading it while we have it open? If you can use SQLite to store the data, it will deal with your locking problems. The pain of getting