Path: csiph.com!usenet.pasdenom.info!gegeweb.org!aioe.org!.POSTED!not-for-mail From: Thomas Rachel Newsgroups: comp.lang.python Subject: Re: io.UnsupportedOperation: fileno Date: Fri, 14 Nov 2014 12:29:17 +0100 Organization: A not so newly installed InterNetNews server Lines: 23 Message-ID: References: <5afd4b4e-e0cd-4436-b15a-936637b4fe2b@googlegroups.com> NNTP-Posting-Host: eVzCf2kCIlV/cSkQegFa5A.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 Hamster/2.1.0.11 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.python:80756 Am 14.11.2014 00:42 schrieb satishmlmlml@gmail.com: > fileno() in not supported. Is it only in 3.1? What is the workaround? You have been asked many times about the details of your environment. Especially, you have been told that it is important to know if you directly use the Python CLI or some GUI like IDLE. I just tested the latter thing and found out that it indeed makes a difference, as it introduces a replacement for the std* stuff you are missing: >>> sys.stdin >>> sys.stdout >>> sys.stderr Calling .fileno() on such a Pseudo*File just raises an UnsupportedOperation exception. This is in contrast to using the CLI directly.