7 ms·
Not sure if someone mentioned it already, but for such use cases Xonsh[1] is amazing. It allows you to use shell stuff in a python script. Basically it allows
by nathan_phoenix 4y ago
Not sure if someone mentioned it already, but for such use cases Xonsh[1] is amazing.
It allows you to use shell stuff in a python script. Basically it allows you to use the best of both worlds, i. e. you can use python for the logic flow while retaining all your quick shell oneliners when neede. And it makes this interaction of python and shell super convenient, i. e. run your oneliner but process its output with python. Much faster than coding everything in python or in shell.
[1]: https://xon.sh/ https://xon.sh/
- themodelplumber 4y agoThat's cool. I'm curious how it differs from e.g. ABS... https://www.abs-lang.org/ https://www.abs-lang.org/ It was enjoyable to use for a project recently.
- nathan_phoenix 4y agoFrom a quick glance seems that the biggest difference is that ABS is a whole new language while Xonsh is just a python superset. I. e. Xonsh is python which can also parse and execute shell commands. What I see as a benefit is that it allows you to reuse your existing python and bash knowledge without having to learn (almost[1]) anything new. [1]: Xonsh does add one or two new things to python. But they are pretty straightforward and aren't required. But are hella nice for more advanced interplay between shell and python.