Checking if stdin is readable on Windows
Discussions on Python.org
Checking if stdin is readable on Windows
In one of my packages, I have a cli tool and I use a function to see if there is anything to read on stdin for piping video in to my cli tool. def stdin_is_readable(): """ stdin_is readable, detect data on stdin. """ readable, _, _ = select.select([sys.stdin], [], [], 0) return sys.stdin in readable This works great on Unix and Linux, but apparently fails on Windows. File "...\threefive\cli.py", line 468, in threefivecli chk_funk_map() File "...\threefive\cli.py", l...
0 comments
No comments yet.