nonblocking reads in windows?

Joe Connellan joec at
Fri Aug 23 06:32:38 EDT 2002

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

if I try to open the fd with
port ="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?


More information about the Python-list mailing list