Python anonymous pipe set timeout
===

I have a feeling its not possible; but is there a way to set a read timeout on an anonymous pipe in Python / C on Linux?

Are there better options than setting and trapping a SIGALRM?

    >>> import os
    >>> output, input = os.pipe()
    >>> outputfd = os.fdopen(output, 'r')
    >>> dir(outputfd)
    ['__class__', '__delattr__', '__doc__', '__enter__', '__exit__', '__format__', '__getattribute__', '__hash__', '__init__', '__iter__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'close', 'closed', 'encoding', 'errors', 'fileno', 'flush', 'isatty', 'mode', 'name', 'newlines', 'next', 'read', 'readinto', 'readline', 'readlines', 'seek', 'softspace', 'tell', 'truncate', 'write', 'writelines', 'xreadlines']
    >>> 
(no `settimeout()` method)