Looking for general advice on complex program

Cameron Simpson cs at zip.com.au
Sat Jul 16 19:24:37 EDT 2011


On 16Jul2011 10:37, Josh English <Joshua.R.English at gmail.com> wrote:
| You use a directory as lock mechanism. I think I get how that works.
| When you're done manipulating the file, do you just remove the director?

Yes. The advantages of a directory are twofold: you can't mkdir() twice
while you can usually open the same file for write more than once (hence
the umask 0777 thing, to prevent that); secondly you can put stuff in it
though that makes removing the directory more work when you're done with
it.

Cheers,
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

THE LOST WORLD is based on (so loosely as to re-define "based on" as
"with the same title as") Michael Crichton's sequel novel, which
introduced us to a second island where dinosaurs were being genetically
engineered.     - Scott Renshaw on _Jurassic_Park_'s sequel



More information about the Python-list mailing list