sys.stdin and idle bug?
Jason B Burke
jason.b.burke at abbott.com
Thu Jan 20 11:23:03 EST 2005
I apologize if this has been brought up before, but
I'm having a small issue with the handling of sys.stdin
I'm using a routine to mimic the c library function
getch(), to get a single character from the keyboard.
The function works in the standard python shell, but
in Idle I get an error when I try to reference sys.stdin.fileno().
Within the standard shell sys.stdin is a file object with
a mode of 'r'. Looks like this in the interpreter:
<open file '<stdin>', mode 'r' at 0xSome_address>
However, in Idle the object is quite different:
<idlelib.rpc.RPCProxy instance at 0xSome_address>
and typing sys.stdin.fileno() returns an AttributeError: fileno.
Is this a bug in idle, or is this normal? If it's normal is
there a work around for it?
Thanks for any replies and references to more info
on this issue.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list