Possible Duplicate:
Python: single instance of program
What is the best way to insure that only 1 copy of a python script is running? I am having trouble with python zombies. I tired creating a write lock using open("lock","w")
, but python doesn't notify me if the file already has a write lock, it just seems to wait.