This thread was almost about Python once

Gordon McMillan gmcm at hypernet.com
Tue Feb 1 15:05:52 CET 2000


Ivan Van Laningham wrote:

> 
> stdin = fd 0
> stdout = fd 1
> stderr = fd2
> next fd you ask for = fd3
> 
> Not braindead at all.  Just a nice tradition, which is observed on
> unices & their descendents, but not on M$.

Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import sys
>>> sys.stdin.fileno()
0
>>> sys.stdout.fileno()
1
>>> sys.stderr.fileno()
2
>>>

It's only a GUI on MS that has no concept of std*. A "feature" 
they stole from a Mac, I guess.

- Gordon




More information about the Python-list mailing list