Syncronizing CGI Scripts

Sheila King usenet at thinkspot.net
Tue Aug 27 02:41:35 CEST 2002


On Mon, 26 Aug 2002 23:32:44 +0200, Thomas Guettler
<pan-newsreader at thomas-guettler.de> wrote in comp.lang.python in article
<pan.2002.08.26.23.32.43.787413.720 at thomas-guettler.de>:

> On Mon, 26 Aug 2002 17:15:19 +0200, Changjune Kim wrote:

> > 
> > You need a locking scheme such as lock file or file locking.
> > 
> [cut]
> 
> Couldn't mutexes be used? 

Yes, but then you need to lock the mutexes. Essentially, that is what my
solution does.
 
> > Of course, you can use a RDBMS such as mysql, or embeded DBMS such as
> > sqlite, gadfly, zodb(with zeo), or bsddb3, which comes with locking ...
> 
> I want it to be as simple as possible. I try to avoid non standard
> modules
> 
>  thomas

In order to apply the solution I came up with, you would need to
install the win32 modules on any windows machines using this module.
http://groups.google.com/groups?as_umsgid=t7uqot8n8gjm03r2m03md8kfsjuauchqhu%404ax.com&lr=

Read the whole thread. Actually, you should probably search for the 
other two threads mentioned, as they have important information from
lots of knowledgeable people about the trickiness of file locking and
so on.

There is another solution that I know of, called "portalocker.py" and
is cross-platform and available on the active state, site, I believe, in 
their cookbook.

Here is a google groups link:
http://groups.google.com/groups?as_umsgid=elt8ht1z.fsf%40pobox.com&lr=

Good luck,




--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/



More information about the Python-list mailing list