News for hackers. Stuff that matters.
Re:Bashing the Bash – Replacing Shell Scripts with Python (2... by MichaelMoser123 on Saturday March 26, 2022 @12:08AM (#30809162)
https://github.com/MoserMichael/subb

https://pypi.org/project/subb/

I wrote this to simplify just that for my own tools; the subprocess module that comes with the batteries has a very general interface, i think that it is a bit complex for a quick script.

My objective was to get an abstraction, for a one line process run and extraction of the result, similar to what we had in Perl5 with the system library function. https://perldoc.perl.org/functions/system

Also the shell is impractical, when it comes to slightly more complex programs. There is a limit on what you can do with pipes. Maybe that's the reason why perl is that flexible, as they tried to bridge both realms: Perl had to be useful as a replacement for the quick shell like script, and to be useful as a general purpose programming language.

There are no comments on this comment yet.