Hacker News new | past | comments | ask | show | jobs | submit login

Slightly off-topic: can anyone recommend a nice framework / library to replace "bash scripts" with Python? For instance, I don't want to deal with subprocess manually.



`sh` is great for that: https://amoffat.github.io/sh/


Nowadays I just use bash because alternative shells often won't be available in dev environments, CI, etc, so bash cannot be avoided anyway. But in the past I've used Python to generate bash script to avoid having to do tricky processing in bash. By piping that into vim you can check the resulting commands before execution in a simple command.

It's a really dumb solution and can work in any language/environment, so I like it.


Something for Python akin to zx for JavaScript?

https://github.com/google/zx





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: