In python 3.2 under OSX, if I'll run "type(sys.stdin)" under Idle I get a strange answer as shown below
>>> type(sys.stdin)
<class 'idlelib.rpc.RPCProxy'>
>>>
But if I'll reun the same command under terminal, I get:
>>> import sys
>>> type(sys.stdin)
<class '_io.TextIOWrapper'>
>>>
I understand this is because I'm running it under IDLE. but is this not misleading?
I was trying to run the following commands in IDLE and spent hours trying to understand as to why this is not working. (I'm still a python noob)
>>> w = sys.stdin.readlines()
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
w = sys.stdin.readlines()
AttributeError: readlines
But just discovered that I works fine under terminal.
>>> w = sys.stdin.readlines()
wow
ww
wewew
>>>
>>> w
['wow\n', 'ww\n', 'wewew\n']
>>>
Is this a bug?