Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #9656

Re: Looking for general advice on complex program

Date 2011-07-17 09:24 +1000
From Cameron Simpson <cs@zip.com.au>
Subject Re: Looking for general advice on complex program
References <5db1e650-54c2-46c4-bafc-496579f9c26c@glegroupsg2000goo.googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.1138.1310858680.1164.python-list@python.org> (permalink)

Show all headers | View raw


On 16Jul2011 10:37, Josh English <Joshua.R.English@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@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

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: Looking for general advice on complex program Josh English <Joshua.R.English@gmail.com> - 2011-07-16 10:37 -0700
  Re: Looking for general advice on complex program Cameron Simpson <cs@zip.com.au> - 2011-07-17 09:24 +1000

csiph-web