3 ms·
I have recently become convinced to use Python 3 scripts instead of all but trivial Bash scripts, however with one constraint: no libraries outside of the stand
by jen20 6y ago
I have recently become convinced to use Python 3 scripts instead of all but trivial Bash scripts, however with one constraint: no libraries outside of the standard library for the minimum target platform, since requiring their installation is often non-trivial.
- m463 6y agoThat's exactly what I do. And it turns out the standard library has a lot of depth to it, even on not-really-python-friendly platforms like macos. I have a standard sort of "template" program that uses argparse and just fill it in. It's nice to be able to iterate over a list of files without worrying about files with spaces in the name. I read and write json and csv files and use curses to colorize output. You can do all these things in a shell script, but they tend to get messy.