4 ms·
You’re right in that writing Python using shell paradigms is awful. Writing Python that shells out to do stuff — but using Python paradigms — isn’t so bad. Pa
by gorgoiler 5y ago
You’re right in that writing Python using shell paradigms is awful.
Writing Python that shells out to do stuff — but using Python paradigms — isn’t so bad. Particularly if you are used to calving off your shell stuff into shell functions that run something and massage the output. In Python you end up doing something pretty similar: yield the text you want and use that as arguments to the next call to subprocess.run.
Basically “| xargs command” but nicer.