4 ms·
Being able to call external commands with backticks alone makes it better suited than Python for shell scripting.
by pipeline_peak 2y ago
Being able to call external commands with backticks alone makes it better suited than Python for shell scripting.
- __MatrixMan__ 2y agoIf you've reached for something with more structure than the string-soup that is bash, why would you then embrace the string-soup that is invoking subprocesses with backticks? Involving an entirely separate parser just to split your args up feels like a footgun to me. Python's `sh` handles this rather nicely: http://sh.readthedocs.io/en/latest/ http://sh.readthedocs.io/en/latest/
- deleted 2y ago[deleted]
- frou_dh 2y agoIMO that feature snatches defeat from the jaws of victory because if the command fails (exit code >0) it doesn't raise an exception. Same issue with the system(...) method by default.