2 ms·
Python has a REPL but it isn't sufficient to be a shell. Therefore, I can't write a program in the Python REPL just as I'm doing stuff normally and copy it into
by msla 6y ago
Python has a REPL but it isn't sufficient to be a shell. Therefore, I can't write a program in the Python REPL just as I'm doing stuff normally and copy it into a file for further editing and polishing. I have to port whatever I did in the shell to whatever other language I'm using, which is more porting than I want to do for most shell scripts, especially ones which are mostly pipelines.
Heck, Python isn't even a good language for one-liners. Not saying it should be, but it further demonstrates that I can't use Python live the way I can use zsh live.
- edgyquant 6y agoHow is python not a good language for one liners? One liners are literally the pythonic way.
- msla 6y agoBy one-liners I meant things like Perl one-liners: perl -pe 's{<b>([^<]+)</b>}{<em>\1</em>}g' < foo.html > out.html Python would never let you get away with treating it like an improved sed.