Ben Finney <ben+pyt...@benfinney.id.au> writes:

> So, having written the opener:
>
> > On Mon, 03 Sep 2012 15:29:05 +0200, Christian Heimes wrote:
> > > import os
> > > 
> > > def opener(file, flags):
> > >     return os.open(file, flags | os.O_EXCL)
>
> why not call that directly?
>
>     f = opener(file, flags)

Ah, because that returns the file descriptor, not the file. I see.

-- 
 \         “If nature has made any one thing less susceptible than all |
  `\    others of exclusive property, it is the action of the thinking |
_o__)              power called an idea” —Thomas Jefferson, 1813-08-13 |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to