From Newsgroup: comp.lang.python
IrCOve been looking at the docs for PythonrCOs rCLosrCY module <
https://docs.python.org/3/library/os.html>. This contains a
collection of low-level interfaces that are specific to particular
operating system platforms. And itrCOs turning into quite a sprawling hodge-podge of function calls and symbol definitions for use with
same: I think itrCOs already up to about 60 printed pages.
Just for a fun, I did a count of the rCLavailabilityrCY info for various features, grouped by the platforms mentioned. My count could be a bit
off by one or two, but judging from the numbers, this will not
appreciably affect any ranking judgements you might want to draw.
Far and away, the number-one platform supported was rCLUnixrCY, with 141 different mentions. This includes a section titled rCLInterface to the schedulerrCY, which warns it is only applicable on rCLsome Unix
platformsrCY, not necessarily all of them.
In second place, almost neck-and-neck, are rCLLinuxrCY (33 mentions) and rCLWindowsrCY (32 mentions). I suppose if all the rCLxattrrCY functions had their own separate rCLavailabilityrCY clauses (as is done in most places elsewhere), this would put Linux comfortably in the lead. And donrCOt
forget that all the rCLUnixrCY and rCLPOSIXrCY ones apply to Linux as well, with just one exception.
It is interesting to note that none of the pseudo-terminal functions,
and few of the ones for controlling terminals from the client side,
are supported on Windows. All of these are available on rCLUnixrCY.
There are also a couple of mentions of availability under rCLPOSIXrCY,
though IrCOm not sure why this is distinct from rCLUnixrCY. There is also a single mention of a macOS-specific API -- special process-priority
values only available on that platform. And two places where functions
are specifically mentioned as being available on particular BSD
variants.
The solitary rCLUnixrCY function not available on Linux is lchmod(), which
is not in POSIX anyway. This is also unavailable on OpenBSD, though
FreeBSD and NetBSD support it.
Is this a sign of the relative popularity of those platforms for
Python programming? I think it could be.
--- Synchronet 3.21f-Linux NewsLink 1.2