fcntl in windows
Michael Hudson
mwh at python.net
Wed Apr 30 13:29:46 EDT 2003
Alex Martelli <aleax at aleax.it> writes:
> Jp Calderone wrote:
>
> > On Wed, Apr 30, 2003 at 03:26:29PM +0000, Afanasiy wrote:
> >> Is there an fcntl in Windows? A stub, a wrapper, etc?
> >
> > http://python.org/doc/lib/module-fcntl.html
>
> The page you indicate says "Availability: Unix", and indeed
> trying:
>
> import fcntl
>
> on Windows gives an ImportError: No module named fcntl
>
>
> As far as I know, nobody's written a fcntl-emulator for
> Windows -- the functionality is clearly available (a bit
> in msvcrt, all of it in win32all, or maybe also through
> ctypes) but the interfaces are, alas, quite different.
Indeed, it would seem to me that implementing a version of fcntl on
Windows would be flat out insane -- surely the sensible thing to do
would be provide two implementations of whatever it is you need, the
unix one of which calls fcntl.
The interface "design" of the fcntl syscall is not something that begs
to be spread around...
Cheers,
M.
--
6. The code definitely is not portable - it will produce incorrect
results if run from the surface of Mars.
-- James Bonfield, http://www.ioccc.org/2000/rince.hint
More information about the Python-list
mailing list