RE: Altering sys.stdin

2013-02-23 Thread drekin
> If you're going to replace something, the replacement needs to at least quack like the original... That's for the freezing, even though an exception would be better. But still, even when custon TextIO object is provided, interactive console doesn't read from it (however input() does). -- htt

Re: Altering sys.stdin

2013-02-23 Thread Andrew Berg
On 2013.02.23 07:00, Draic Kin wrote: > Intepreter actually freezes when an object without > encoding attribute is assigned to sys.stdin. Why is that? I that a > correct behavior? Is there any workaround to alter input object for > interactive console? If you're going to replace something, the rep

Altering sys.stdin

2013-02-23 Thread Draic Kin
Hello, it seems that Python interactive console actually doesn't use sys.stdin to read input (it just affects e.g. input() function). However it uses sys.stdin.encoding. Intepreter actually freezes when an object without encoding attribute is assigned to sys.stdin. Why is that? I that a correct beh