question on select

Gerhard Häring gerhard.haering at opus-gmbh.net
Wed Nov 6 20:56:39 EST 2002


In article <lohjsuc5n97g8guh7jht4e8b4t909rdgeq at 4ax.com>, Gonçalo Rodrigues wrote:
> Hi,
> 
> I know that select does not work on file objects in the Windows
> platform. But does select work on sys.stdin? On the Windows platform,
> that is.

Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> type(sys.stdin)
<type 'file'>
>>> sys.stdin.fileno()
0
>>>

Does that answer your question? ;-)

stdin/stdout/stderr *are* file objects.
-- 
Gerhard Häring
OPUS GmbH München
Tel.: +49 89 - 889 49 7 - 32
http://www.opus-gmbh.net/



More information about the Python-list mailing list