Making sure script only runs once instance at a time.

Hari Sekhon hpsekhon at
Wed Sep 27 17:53:01 CEST 2006

I have written a script and I would like to ensure that the script is 
never run more than once at any given time.

What is the best way of testing and exiting if there is another version 
of this script running somewhere on this machine?

I guess what I'm asking is how to handle system processes the way I can 
in shell. I am running this on linux.



Hari Sekhon

More information about the Python-list mailing list