io.UnsupportedOperation: fileno

Ben Finney ben+python at benfinney.id.au
Fri Nov 14 00:52:11 CET 2014


satishmlmlml at gmail.com writes:

> fileno() in not supported.

It is supported, but it is behaving as the documentation describes
<URL:https://docs.python.org/3/library/io.html#io.IOBase.fileno>.

> Is it only in 3.1? What is the workaround?

Expect an exception when you ask for the file descriptor on a stream
that does not use a file descriptor.

-- 
 \       “Pinky, are you pondering what I'm pondering?” “Well, I think |
  `\       so, Brain, but ‘apply North Pole’ to what?” —_Pinky and The |
_o__)                                                           Brain_ |
Ben Finney




More information about the Python-list mailing list