Question: posix fcntl module

Ignacio Vazquez-Abrams ignacio at openservices.net
Wed Aug 29 00:32:00 EDT 2001


On Wed, 29 Aug 2001, Sheila King wrote:

> On Tue, 28 Aug 2001 20:02:51 -0400 (EDT), Ignacio Vazquez-Abrams
> <ignacio at openservices.net> wrote in comp.lang.python in article
> <mailman.999043423.30546.python-list at python.org>:
>
>  [snip]
>
> :Also, you should make it so that the file is immediately opened in __init__(),
>
> Why? I don't see any persuasive reason for that. The methods that I'm
> using under windows don't allow for me to separate the action of opening
> the file and obtaining the lock (there is a single command which does
> both), and I wanted to keep the functions between the windows and the
> posix versions as close to parallel as possible. In any case, I can't
> see any compelling reason for the file opening to occur in the init
> function.

I just finished talking with a friend who's done more recent Win32 development
than me, and he claims that you can reopen the file (without closing it) using
the aforementioned API function again in order to apply a lock. It sounds
fishy to me too, but it might be worth a shot.

-- 
Ignacio Vazquez-Abrams  <ignacio at openservices.net>





More information about the Python-list mailing list