Aaron> Would it suffice to call 'os.open' with flags= _O_CREAT| _O_EXCL Aaron> ? Would that be platform-independent?
I suspect it would be platform-independent but not NFS-safe. (The other solutions in lockfile might have NFS problems as well. In any case, lockfile provides a bit more functionality as well, including timeouts and the ability to break locks. Skip -- http://mail.python.org/mailman/listinfo/python-list