Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'attribute': 0.05; 'that?': 0.05; 'python': 0.09; '(it': 0.09; 'alter': 0.09; 'encoding': 0.15; 'freezes': 0.16; 'function).': 0.16; 'input': 0.18; 'seems': 0.23; 'message-id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'correct': 0.28; 'workaround': 0.29; 'e.g.': 0.30; 'affects': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'received:209.85': 0.35; 'there': 0.35; 'thank': 0.36; 'uses': 0.37; 'why': 0.37; 'received:209': 0.37; 'object': 0.38; 'to:addr:python.org': 0.39; 'hello,': 0.39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=ZU2pehYqpXR4CfKw0o3EmEwB2gWrEGwyD+GdgV30FC0=; b=OR3VumqOxgwavbfzuDvKRLbxaCFMpvkVZgX7RENF/xcgyEyQZhUw6XRt6dcTAfkliC 4Srmh7GiX1TjuTaGaRuCsfKZ8WH1N0e4/6FuUe05k6IOCXJ5JUInP7N6j7qRVONFGdT5 1ONeG9eyStGue4IpY7T+CcijsV08bgEnlc8V3E72zH/3/YpghZgWh/28l3Rm5BtBjg2m TdRhE2vne+QRkC3IAh9dUCOrYzGu8hbiwb+LW7lDdGMa+H5rzq/Io5c6doiq7RWVwDGq l4NskGQrVIjzb9WYUyLP49wfoR7HpHY2oFzzdI5EKOqlGltgSLNlN8H57aWUT0X9TcXQ qv3Q== MIME-Version: 1.0 X-Received: by 10.112.23.193 with SMTP id o1mr2169199lbf.66.1361624455546; Sat, 23 Feb 2013 05:00:55 -0800 (PST) Date: Sat, 23 Feb 2013 14:00:55 +0100 Subject: Altering sys.stdin From: Draic Kin To: python-list@python.org Content-Type: multipart/alternative; boundary=485b390f7c00fd8a3c04d663e59a X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361624464 news.xs4all.nl 6860 [2001:888:2000:d::a6]:54506 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39663 --485b390f7c00fd8a3c04d663e59a Content-Type: text/plain; charset=UTF-8 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 behavior? Is there any workaround to alter input object for interactive console? Thank you, Drekin --485b390f7c00fd8a3c04d663e59a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello,
it seems that Python interactive console actually doesn't use= sys.stdin to read input (it just affects e.g. input() function). However i= t uses sys.stdin.encoding. Intepreter actually freezes when an object witho= ut encoding attribute is assigned to sys.stdin. Why is that? I that a corre= ct behavior? Is there any workaround to alter input object for interactive = console?

Thank you, Drekin
--485b390f7c00fd8a3c04d663e59a--