Yeah! I am much in favor of a (somewhat)platform-independent implementation
in the standard distribution. Good Work!
> allows arbitrary file locks, including sections of a file. How this
> exactly translates to BSD I forgot, but I'm sure it can be made
> To refresh you memory, here's the introduction to the module:
Is posixfile in the distribution? I haven't seen it referred to before
and I do not see it in the 1.0.1 or 1.0.2 distributions. I do have the
posix and posixpath modules, but the posixfile.file() and
posixfile.flags() functions are not in either one of these. The other
functions descibed here as belonging to posixfile (dup() and dup2()) are
in the posix module in both 1.0.1 and 1.0.2, along with a number of other
file manipulating functions.
> # Extended file operations
> # f = posixfile.open(filename, mode)
> # f.file()
> # will return the original builtin file object
> *** This used to be necessary for marshal.dump() et al., but
> I'm not sure it's still necessary...
I think it is a greast idea to have this function. I wish I had it now.
The reason is that sometimes you want to do complex operations like
flock(), fcntl(), dup(), etc... in which case you need the posixfile type
of interface. But sometimes it is much easier to simply do an f.readlines()
on an open file object. The interface proposed here would allow for both.
Please leave it in!