sys.stdin.read question
It's me
itsme at yahoo.com
Tue Dec 7 18:00:53 EST 2004
Yes, if I run the script from the command prompt, it works. I was running
it inside the Python IDE.
Thanks,
--
It's me
"Grant Edwards" <grante at visi.com> wrote in message
news:41b628c9$0$11072$a1866201 at visi.com...
> 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