On 14Nov2014 09:51, Ian Kelly <ian.g.ke...@gmail.com> wrote:
On Fri, Nov 14, 2014 at 12:36 AM, Cameron Simpson <c...@zip.com.au> wrote:
On 13Nov2014 15:48, satishmlm...@gmail.com <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?
The first workaround that suggests itself it to use a more modern Python.
I've got 3.4.2 here, and it goes: [... works just fine ...]
Why do you think the Python version has anything to do with it?
Python 2.7.6 (default, Mar 22 2014, 22:59:56) [... works just fine ...]
Clearly, in 2.7.6 it also "just works".
Yeah, true.
I think the consensus is now that the OP is using some kind of IDE where the IO
streams are not connected to terminals or other real OS-level files, but to
stream abstractions delivering the the IDE display widgetry. Thus no .fileno()
facility, because there is no OS-level file.
But we have yet to obtain that information from the OP.
Cheers,
Cameron Simpson <c...@zip.com.au>
That's about as good as when one of my students left me a note signed
'anon.'--written on personalized stationery.
- Ayse Sercan <a...@netcom.com>
--
https://mail.python.org/mailman/listinfo/python-list