Title: select() fails when selecting on a file descriptor.
Type: behaviour Severity: normal
Components: Library Versions: 2.5b1
Status: closed Resolution: invalid
Dependencies: Superseder:
Assigned To: Nosy List: amak, cartman
Priority: Keywords:

Created on 2009-01-27.09:11:52 by cartman, last changed 2009-01-28.13:15:05 by amak.

msg4086 (view) Author: İsmail Dönmez (cartman) Date: 2009-01-27.09:11:51
Test code:

import os
from select import select"foo.txt",os.O_WRONLY|os.O_CREAT)

running with jython 2.5b1 results in:

Traceback (most recent call last):
  File "", line 5, in <module>
  File "/usr/bin/jython/Lib/", line 176, in native_select
  File "/usr/bin/jython/Lib/", line 95, in register
  File "/usr/bin/jython/Lib/", line 95, in register
  File "/usr/bin/jython/Lib/", line 56, in _getselectable
TypeError: ("Object '' is not
watchable", 88)

Java version:

java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) 64-Bit Server VM (build 11.0-b16, mixed mode)

running on Linux.
msg4095 (view) Author: Alan Kennedy (amak) Date: 2009-01-28.13:15:04
This is expected behaviour.

On java, and thus on jython, *only* sockets can be selected upon.

Files *cannot* be selected upon, because the FileChannels underlying
"file descriptors" on jython do not subclass

I have updated the documentation on the select module wiki page to make
this more explicitly clear.
Date User Action Args
2009-01-28 13:15:05amaksetstatus: open -> closed
resolution: invalid
messages: + msg4095
nosy: + amak
title: select() fails -> select() fails when selecting on a file descriptor.
2009-01-27 09:11:53cartmancreate