Help: using msvcrt for file locking
sheila at spamcop.net
Sun Aug 26 19:40:17 CEST 2001
On Sun, 26 Aug 2001 12:59:09 -0400 (EDT), Ignacio Vazquez-Abrams
<ignacio at openservices.net> wrote in comp.lang.python in article
<mailman.998845240.31171.python-list at python.org>:
:On Sun, 26 Aug 2001, Sheila King wrote:
:> I am intending to use this for programs that will access databases.
:> Specifically, CGI scripts using the Berkeley data base hash. The
:> Berkeley Sleepy Cat that I have access to doesn't support concurrent
:> write access. I have to handle the file locking myself.
:I'm just curious as to why you're not using a database server for this. Any
Because I don't have access to one. (Not everyone does, you know.)
In my case, I could spend extra $$$ (on the order of $20 extra per month
over what I'm spending for hosting now) to get a mySQL database, but I
can't do that right now. (Probably some day, I will.)
I looked at Gadfly, but it doesn't support concurrent access, and
requires running a server. I can't have a process running all the time
in the background (as I mentioned in another post that you may not have
seen yet), so running it all the time is out. And starting up the server
every time I want to run a CGI script seems prohibitive (too much time
and CPU usage).
Even if I managed to get access to a database server, there'd be someone
else who wanted to do what I'm doing. It's quite common in CGI scripts.
I'm guessing, because of the frequent references to the fact that Perl
only *appears* to provide cross-platform file locking, that many of the
cgi scripts that are out there don't actually work as the author
More information about the Python-list