On Thu, Nov 13, 2014 at 3:48 PM,  <satishmlm...@gmail.com> wrote:
> import sys
> for stream in (sys.stdin, sys.stdout, sys.stderr):
>            print(stream.fileno())
>
>
> io.UnsupportedOperation: fileno
>
> Is there a workaround?
> --
> https://mail.python.org/mailman/listinfo/python-list

Works for me, although it's a little different in Jython:
$ pythons --command 'import sys; print(sys.stdin.fileno())'
/usr/local/cpython-2.4/bin/python good 0
/usr/local/cpython-2.5/bin/python good 0
/usr/local/cpython-2.6/bin/python good 0
/usr/local/cpython-2.7/bin/python good 0
/usr/local/cpython-3.0/bin/python good 0
/usr/local/cpython-3.1/bin/python good 0
/usr/local/cpython-3.2/bin/python good 0
/usr/local/cpython-3.3/bin/python good 0
/usr/local/cpython-3.4/bin/python good 0
/usr/local/jython-2.7b3/bin/jython good org.python.core.io.StreamIO@170ed6ab
/usr/local/pypy-2.3.1/bin/pypy good 0
/usr/local/pypy-2.4.0/bin/pypy good 0
/usr/local/pypy3-2.3.1/bin/pypy good 0
/usr/local/pypy3-2.4.0/bin/pypy good 0
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to