Within Linux, there is a file, /sys/kernel/debug/tracing/trace_pipe, which as the name says, is a pipe. So, let\'s say I want to read the first 50 bytes from it
/sys/kernel/debug/tracing/trace_pipe
f = os.open("/sys/kernel/debug/tracing/trace_pipe", os.O_RDONLY|os.O_NONBLOCK)
Should prevent blocking (works in Unix only).. No need for select here..