Mastodon Feed: Post

Mastodon Feed

Boosted by glyph ("Glyph"):
bremner@mathstodon.xyz ("David Bremner") wrote:

OK @glyph challenge accepted. Here is python programming talk.

I have a script that uses "with Popen(...,stdout=PIPE)" to run a program and roughly run grep. Now I'd like to add a timeout, but I don't want to buffer the output (because it is unbounded), so run is out. Currently I am running /usr/bin/timeout from python, but this is, uh, unpythonic.

#python #MastOverflow