3 ms·
Because shell is really good at gluing together commands and has reasonably straightforward error management mechanisms Contrast that with: subprocess.run
by mdaniel 5y ago
Because shell is really good at gluing together commands and has reasonably straightforward error management mechanisms
Contrast that with:
subprocess.run("some_thing with-output")
subprocess.run("the_next_thing")
which requires that the caller take steps to grab, check, and then re-emit any errors (or even just the "normal" output) produced by either of those, not to mention the horrors of output buffering for long-running processes and the ever-present encoding woes since subprocess interfaces as bytes not str
I guess it is the same situation with all programming -- diligent programmers can make it work, less disciplined users inflict pain upon all downstream users of poorly coded scripts