Re:Show HN: Clamshell- an experimental Python based shell
by slig on Saturday January 28, 2023 @03:13PM
(#34561302)
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.
[ Parent
| on HN ]
Re:Show HN: Clamshell- an experimental Python based shell
by 0x6c6f6c on Saturday January 28, 2023 @03:16PM
(#34561336)
Something for Python akin to zx for JavaScript?
Re:Show HN: Clamshell- an experimental Python based shell
by alxprc on Saturday January 28, 2023 @03:55PM
(#34561750)
Maybe Plumbum: https://plumbum.readthedocs.io/en/latest/
Re:Show HN: Clamshell- an experimental Python based shell
by goffi on Saturday January 28, 2023 @04:10PM
(#34561916)
`sh` is great for that: https://amoffat.github.io/sh/
Re:Show HN: Clamshell- an experimental Python based shell
by woolion on Saturday January 28, 2023 @05:00PM
(#34562429)
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.