Hacker News new | ask | show | jobs
by oguz-ismail 373 days ago
> The Python code Kragen gave is more characters to type, but fewer footguns.

What are the footguns in this?

    df | grep /$
1 comments

There are none AFAIK.

Allow me to correct my previous comment: using Python's os.spawnlp or Popen to invoke Unix commands has fewer footguns than using the shell. (Kragen's code only addresses your question of how to set up a pipeline in Python.)