nonblocking reads in windows?

Joe Connellan joec at mill.co.uk
Fri Aug 23 12:32:38 CEST 2002


I have opened a serial port and if there is nothing there to be read
os.read() hangs whereas I want it to return "".

if I try to open the fd with
port = os.open("COM1", os.O_RDWR | os.O_NONBLOCK)

I get an AttributeError saying that os has no attribute O_NONBLOCK. And
the windows select module doesn't support filehandles so it seems I
cannot do it that way either.

Is there any way I can do this on windows?

Joe





More information about the Python-list mailing list