News for hackers. Stuff that matters.
Re:Shshsh is a bridge connects Python and shell by nrclark on Sunday September 24, 2023 @07:28AM (#37632132)
Deployment scripts are production code, same as whatever you're deploying. If your CI/CD docker images break, you're just as stuck as if your payload breaks.

I totally see the benefit of moving complex shell logic to Python (and still calling some shell helpers) but that doesn't mean you need to have a whole extra dependency for it.

You could write a one-line function that wraps subprocess.Popen.communicate, and use it instead for 90% of the benefit.

If the argument is "I don't want to learn it", or "too much effort", then I'd ask - is saving 15 minutes one time during development really worth a permanent dependency?

And when some other dev has to maintain the code later, how much extra time will they spend figuring out what I>> means or does? A lot of python devs are already familiar with the subprocess Popen API.

There are no comments on this comment yet.