Clearing stdin in Python without blocking program flow.

It turns out that clearing stdin is made easy with Python’s select module. If you’re just interested in the code, here’s the Gist. Otherwise, let’s work through it.

»
Author's profile picture @dsclose on linux and python