comp lockfile in python 3