def _copy(master_fd, master_read=_read, stdin_read=_read):
 while 1:
  (rfds, wfds, xfds) = select([master_fd, STDIN_FILENO], [], [])
  if (master_fd in rfds):
   data = master_read(master_fd)
   os.write(STDOUT_FILENO, data)
  if (STDIN_FILENO in rfds):
   data = stdin_read(STDIN_FILENO)
   _writen(master_fd, data)

def _copy ( master_fd , master_read = _read , stdin_read = _read ) : while 1 : ( rfds , wfds , xfds ) = select ( [ master_fd , STDIN_FILENO ] , [ ] , [ ] ) if ( master_fd in rfds ) : data = master_read ( master_fd ) os . write ( STDOUT_FILENO , data ) if ( STDIN_FILENO in rfds ) : data = stdin_read ( STDIN_FILENO ) _writen ( master_fd , data )
parent copy loop .