• =?UTF-8?B?UHl0aG9u4oCZcw==?= OS-specific API support

    From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.linux.advocacy,comp.os.ms-windows.advocacy,comp.sys.mac.advocacy on Wed Mar 25 01:33:22 2026
    From Newsgroup: comp.os.linux.advocacy

    I’ve been looking at the docs for Python’s “os” 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 it’s turning into quite a sprawling hodge-podge of function calls and symbol definitions for use with
    same: I think it’s already up to about 60 printed pages.

    Just for a fun, I did a count of the “availability” 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 “Unix”, with 141 different mentions. This includes a section titled “Interface to the scheduler”, which warns it is only applicable on “some Unix
    platforms”, not necessarily all of them.

    In second place, almost neck-and-neck, are “Linux” (33 mentions) and “Windows” (32 mentions). I suppose if all the “xattr” functions had their own separate “availability” clauses (as is done in most places elsewhere), this would put Linux comfortably in the lead. And don’t
    forget that all the “Unix” and “POSIX” 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 “Unix”.

    There are also a couple of mentions of availability under “POSIX”,
    though I’m not sure why this is distinct from “Unix”. 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 “Unix” 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
  • From DFS@nospam@dfs.com to comp.os.linux.advocacy on Tue Mar 24 22:42:46 2026
    From Newsgroup: comp.os.linux.advocacy

    On 3/24/2026 9:33 PM, Lawrence D’Oliveiro wrote:

    <snip>


    Is this a sign of the relative popularity of those platforms for
    Python programming? I think it could be.


    I question your sanity, Larry Duh, considering you recently insisted
    gamer stats on Steam meant there were now more Linux desktops than Macs.

    But you can find the OS answer you seek at:

    https://lp.jetbrains.com/python-developers-survey-2024/#general-python-usage


    Operating system

    59% Linux
    58% Windows
    27% macOS
    2% BSD
    1% Other


    There are tons of stats in that survey. Other high-level stats are:

    * most popular IDE: MS Visual Studio Code (2x PyCharm)
    * gender: 89% male, 7% female, 3% won't say, 1% mentally ill
    * biggest % of devs are in the United States: 14%
    --- Synchronet 3.21f-Linux NewsLink 1.2