I have a number of simple scripts I run with cron hourly on Centos linux. I want the script to check first thing if its already running and if so exit.
In perl I did it with this at the start of every script: use Fcntl ':flock'; INIT { open LH, $0 or die "Can't open $0 for locking!\nError: $!\n"; flock LH, LOCK_EX | LOCK_NB or die "$0 is already running somewhere!\n"; } How can I do something like this in Python? -- https://mail.python.org/mailman/listinfo/python-list