3 ms·
Python's subprocess is a bit more clumsy than Perl's built in features for running commands, with the proviso that running commands in Perl is best described as
by rwmj 6y ago
Python's subprocess is a bit more clumsy than Perl's built in features for running commands, with the proviso that running commands in Perl is best described as "idiomatic". Maybe if you didn't learn it 20 years ago like I did you'd have a hard time with its irregularity and colloquialisms.
Is there any non-shell scripting language that makes it as easy as shell to run external commands, redirect I/O etc.? I don't know of any. (Perhaps that is the very definition of a shell.)
- jasonhansel 6y agoAgreed. I really want a language that makes it easy to run subprocesses and do other Unix/shell magic, while being more straightforward and modern than Perl. I think a good way of doing this would be to make a shell that has more expressive power and a clearer syntax.
- Tyr42 6y agoRuby uses the same sorta commands as perl does I think.
- ma2rten 6y agoThis is one of the few things really missing from python. I am wondering how easy it would be to write a PEP for an outsider.
- lmm 6y agoTCL ships with tclsh which is regular TCL (so a first-class programming language) but allows you to invoke external commands as though they were functions (so arguably is a shell in your sense, though I wouldn't advise using it as your login shell).
- lmns 6y agosubprocess.run() isn't too bad.
- jhgb 6y ago> Is there any non-shell scripting language that makes it as easy as shell to run external commands, redirect I/O etc.? Would Scsh count?