def fileno(self):
self.lock.acquire()<EOL>try:<EOL><INDENT>if self._pipe is not None:<EOL><INDENT>return self._pipe.fileno()<EOL><DEDENT>self._pipe = pipe.make_pipe()<EOL>p1, p2 = pipe.make_or_pipe(self._pipe)<EOL>self.in_buffer.set_event(p1)<EOL>self.in_stderr_buffer.set_event(p2)<EOL>return self._pipe.fileno()<EOL><DEDENT>finally:<EOL><INDENT>self.lock.release()<EOL><DEDENT>
Returns an OS-level file descriptor which can be used for polling, but
but I{not} for reading or writing.  This is primaily to allow python's
C{select} module to work.

The first time C{fileno} is called on a channel, a pipe is created to
simulate real OS-level file descriptor (FD) behavior.  Because of this,
two OS-level FDs are created, which will use up FDs faster than normal.
(You won't notice this effect unless you have hundreds of channels
open at the same time.)

@return: an OS-level file descriptor
@rtype: int

@warning: This method causes channel reads to be slightly less
    efficient.