File locking in python

If you do software development, almost any kind of it, at one point you will
find this scenario where you are running some code in a process in a cron
job (or any kind of periodic scheduler). Now, the crontab entry sets that this
process has to be run, for example, each 5 minutes. One day 5 minutes is not
enough for that process (that usually takes less than a minute) to finish... and
there it goes the next call to run that code.

"What could go wrong?" (TM)

Well, depending on the code, maybe nothing happens, maybe an ugly mess will turn
a nice day into a nightmare or maybe you will get a call in the middle of the
night urging you to fix it ASAP.

This site is an effort to share some of the base knowledge I have gathered through all this years working with Linux, FreeBSD, OpenBSD, Python or Zope, among others. So, take a look around and I hope you will find the contents useful.