Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #197739

Re: Python linuxfs Modules

Path csiph.com!weretis.net!feeder8.news.weretis.net!news.nntp4.net!.POSTED!not-for-mail
From Oguz Kaan Ocal <oguzkaanocal3169@hotmail.com>
Newsgroups comp.lang.python
Subject Re: Python linuxfs Modules
Date Tue, 17 Mar 2026 14:30:42 +0300
Message-ID <c51f175a-5e17-8e2e-d50b-128f148a036d@hotmail.com> (permalink)
References <10pask7$2m01c$1@dont-email.me>
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Trace eJzLSy0v1svLKykw0ctLLbHm4szJT0/PzEvXTUksSbRVMjQzNjQ0NFKyVshNzMzRTc7PLchJzMwrKdYtybdVSkwqLU51gOtWUtBXAAA3SBpP
User-Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1
To Lawrence D’Oliveiro <ldo@nz.invalid>
Cancel-Lock sha1:tdarvXmyxfYxbiDsl/zyg8f3bzs= sha256:cDSiNZzgUh8oxYXboLy5dzC0y/GIHItLytVgzG5uH5o=
In-Reply-To <10pask7$2m01c$1@dont-email.me>
X-Abuse-Contact "Web: https://news.nntp4.net/abuse.php / Mail: abuse@nntp4.net"
Xref csiph.com comp.lang.python:197739

Show key headers only | View raw


On 17.03.2026 09:33, Lawrence D’Oliveiro wrote:
> python_linuxfs <https://gitlab.com/ldo/python_linuxfs> is a set of
> Python modules providing higher-level wrappers around various
> Linux-specific system APIs. Some of these already have support in the
> “os” module in the standard Python library, but most don’t. Even for
> the ones that do, I think my wrappers are nicer to use, because they
> avoid the requirement for working with bitmasks and use sets of
> symbolic bit enums instead (with easy conversions between both forms).
> 
> The package is split into five modules:
> 
>    * linuxfs -- file/directory functions and common utilities used by
>      other modules
>    * linuxacl -- access-control-list functions
>    * linuxmount -- enhanced Linux mount API
>    * linuxpriv -- privilege control, i.e. the Linux landlock API
>    * linuxproc -- process control: prctl (selected), pidfd,
>      signalfd and signal mask sets, namespaces
Interesting approach. Regarding the linuxacl and linuxmount modules: how 
do you handle compatibility across different kernel versions? Since some 
of these APIs (like Landlock or newer mount features) are relatively 
recent, does the library provide graceful fallbacks or just raise 
NotImplementedError?

Using sets of enums instead of bitmasks is definitely 'The Pythonic 
Way'. It makes the code much more self-documenting.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Python linuxfs Modules Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-17 06:33 +0000
  Re: Python linuxfs Modules Oguz Kaan Ocal <oguzkaanocal3169@hotmail.com> - 2026-03-17 14:30 +0300
    Re: Python linuxfs Modules Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-17 21:26 +0000
      Re: Python linuxfs Modules Oguz Kaan Ocal <oguzkaanocal3169@hotmail.com> - 2026-03-22 14:14 +0300
  Re: Python linuxfs Modules Paul Rubin <no.email@nospam.invalid> - 2026-03-17 23:28 -0700
    Re: Python linuxfs Modules Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-18 08:04 +0000
      Re: Python linuxfs Modules Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-21 23:10 +0000
  Re: Python linuxfs Modules DFS <nospam@dfs.com> - 2026-04-08 12:26 -0400

csiph-web