Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:not': 0.03; '16,': 0.03; 'cpython': 0.05; 'subject:Python': 0.06; 'dan': 0.09; 'cc:addr:python-list': 0.11; '4:25': 0.16; 'cc:name:python list': 0.16; 'curious.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'integer': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'message-id:@mail.gmail.com': 0.30; 'supposed': 0.32; 'guess': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'object,': 0.36; 'nov': 0.38; 'pm,': 0.38; 'little': 0.38; 'skip:p 20': 0.39; 'according': 0.40; 'different': 0.65; 'skip:/ 30': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=gBMM5RuxkePO4rXcx9oaT0MAko2HebjeWohQLVC4wdg=; b=QyFxz76MrI+EqD932f01/tVv35JR8qrbSE28U2qUk5no1KIRpdhHN94+UMIyDK1nv5 mg8S595BRoil3yCI6FOfGnyrRKGJ0ri6WcKL77T+gqm4LglIJeaBdJyXhlpMtd4TIDW9 9ehOqFIr1SqUtWS+D0n5p5U0bXpjbpM6yg+sXOnLCrz8EgbzNbbhIimXiKzfCagLNI6d j6a/5EaBEe2E93gIpx+tAkSigZtRiEetN463GQYiK2JFVbRzv9GFo28fbK3P+B3QtjoH 3W2NsYB1y/6VRHzonYlpopX12fZ1LeiZX8hCTbriCDO/YeIex3qdSbDhAfR9M1uwCo83 zbDw== MIME-Version: 1.0 X-Received: by 10.42.179.195 with SMTP id br3mr20375106icb.37.1416115785228; Sat, 15 Nov 2014 21:29:45 -0800 (PST) In-Reply-To: References: Date: Sun, 16 Nov 2014 16:29:45 +1100 Subject: Re: fileno() not supported in Python 3.1 From: Chris Angelico Cc: Python List Content-Type: text/plain; charset=UTF-8 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: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416115794 news.xs4all.nl 2960 [2001:888:2000:d::a6]:58715 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:80855 On Sun, Nov 16, 2014 at 4:25 PM, Dan Stromberg wrote: > Works for me, although it's a little different in Jython: > $ pythons --command 'import sys; print(sys.stdin.fileno())' > /usr/local/jython-2.7b3/bin/jython good org.python.core.io.StreamIO@170ed6ab Huh, that is curious. According to its CPython docstring, it's supposed to return an integer (no idea if that's standardized)... but I guess if os.read() takes that StreamIO object, then it'll do as well. ChrisA