python_linuxfs <https://gitlab.com/ldo/python_linuxfs> is a set ofInteresting approach. Regarding the linuxacl and linuxmount modules: how
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
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.
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.
There were a few things like this that were missing for years. I was
going to suggest adding them to your modules, but it looks like
they've finally made it to the Python world elsewhere.
| Sysop: | Jacob Catayoc |
|---|---|
| Location: | Pasay City, Metro Manila, Philippines |
| Users: | 5 |
| Nodes: | 4 (0 / 4) |
| Uptime: | 121:36:02 |
| Calls: | 125 |
| Calls today: | 125 |
| Files: | 489 |
| D/L today: |
859 files (365M bytes) |
| Messages: | 76,611 |
| Posted today: | 26 |