Hacker News new | ask | show | jobs
by Bystroushaak 1104 days ago
I usually replace shell scripts with python (using sh module: https://amoffat.github.io/sh/ for calling other scripts/programs).
3 comments

Golang is better suited for this, for my needs at least.
Yeah, lego-acme is a solid alternative.

https://github.com/go-acme/lego

Er, are we comparing ACME clients or shell alternatives?
yeah until your scripts stop running someday because python...
Can you elaborate?
Python scripts will often break with system upgrades, most acutely when Python2 went away, but under many other circumstances as well.
I would expect python2 to only have gone away across major versions of an OS, which is about as non-disruptive as it could have been, considering.

Of course, as I write this ansible is broken on one of my machines for reasons that appear to stem from a python 3.x->3.y update, so...

That's the thing — Python can break with any OS update (I personally can break it whenever I touch it ;)

OTOH a script for /bin/sh written 30 years ago has a good chance running today unchanged.

Having said that, I still would not recommend shell for anything that needs to be robust and secure.

Well. I've been using python personally since 2007, and it never broke with update (I still occasionally run scripts written for 2.5). Also, I am working as a python backend dev, dealing with hundreds of systems (we are deploying 270+ systems and supporting another 340 user built docker images built on top of py library), and no problems there either. In my previous job, I was doing deployment to 4000+ kiosk computers, and still, no problems with python breaking.

What was definitely problematic was the update from 2 to 3. Another problem may be dependency management (people not pinning dependencies). But the python itself? What does it even mean? Interpreter not starting?

macOS doesn’t even come with Python..