Making sure script only runs once instance at a time.

Fredrik Lundh fredrik at pythonware.com
Fri Sep 29 13:08:26 EDT 2006


Tim Williams wrote:

> So that I know my mistake, which bit fails (the text from
> sys.exc_info()[1]?? ) , or is it all complete rubbish - and not
> do-able -  on a *nix system ?

opening a file for writing doesn't lock it on Unix.  if you want 
locking, you need other mechanisms, and I'm not sure any of them
work properly on all configurations, under all circumstances.

(there's a reason why people are still using "1970s technology"
to do locking on Unix...)

</F>




More information about the Python-list mailing list