sys.stdin.read question

Grant Edwards grante at visi.com
Tue Dec 7 17:03:53 EST 2004


On 2004-12-07, It's me <itsme at yahoo.com> wrote:

>> Dunno. Works fine for me under 2.3.4, and according to the
>> docs, should work under 2.4.
>>
>> What do you get when you do this:
>>
>>  import sys
>
> Done that.
>
>>  type(sys.stdin)
>
> I get:
>
>     <type 'instance'>
>
>>  dir(sys.stdin)
>
> I get:
>
> ['_RPCProxy__attributes', '_RPCProxy__getattributes',
> '_RPCProxy__getmethods', '_RPCProxy__methods', '__doc__', '__getattr__',
> '__init__', '__module__', 'encoding', 'oid', 'sockio']

> ????????

As somebody else already suggested, you must be running your
program inside some sort of IDE that replaces sys.stdin with
some other object that doesn't have a read() method.  Try
running the program from a shell prompt.


-- 
Grant Edwards                   grante             Yow!  Someone in DAYTON,
                                  at               Ohio is selling USED
                               visi.com            CARPETS to a SERBO-CROATIAN



More information about the Python-list mailing list