Comment

Comment by d0mine

On "Calling Other Programs with subprocess": It pains me that the default way to run an external command (subprocess.run) doesn't raise an exception for non-zero exit code violating the Zen of Python: "Errors should never pass silently. Unless explicitly silenced."

Would it make it too advanced to show subprocess.Popen example with stdin=PIPE for providing input instead of writing to disk? Or an example on how to force timeout for a command that might spawn its own child processes (send signal to a process group).

parent d0mine 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton