Comment on What are the recommended scripting languages for complex shell scripts beyond bash?
thesmokingman@programming.dev 1 year agoI’m trying to understand where you’d want to use PowerShell over Python. What’s something that’s in-between bash and Python?
MajorHavoc@lemmy.world 1 year ago
Good question.
The Python subprocess module is a huge pain in the ass.
PowerShell has about 80% of the power and readability of Python, while actually being a native shell.
thesmokingman@programming.dev 1 year ago
Yeah, that’s fair. I was wondering if you’d call that out.
Popen
is rather opaque. I don’t know that I’d go so far as to try to remember yet another language to avoid it. I respect the decision though, especially with the portability of modern PowerShell.catastrophicblues@lemmy.ca 1 year ago
I think you’d like the alternatives that mix languages with Shell. See Google’s zx or (shameless plug) my pysh for instance.