Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The Python code Kragen gave is more characters to type, but fewer footguns.

What are the footguns in this?

    df | grep /$


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.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: