This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cagney
Recipients Dolda2000, benjamin.peterson, cagney, hynek, martin.panter, pitrou, python-dev, r.david.murray, serhiy.storchaka, stutzbach
Date 2019-04-09.21:26:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1554845219.2.0.320580655277.issue20074@roundup.psfhosted.org>
In-reply-to
Content
Another example is PTY:

Python 2.7.15 (default, Oct 15 2018, 15:24:06) 
[GCC 8.1.1 20180712 (Red Hat 8.1.1-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> pty, tty = os.openpty()
>>> print(pty, tty)
(3, 4)
>>> import io
>>> rw = io.open(pty, "r+")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: File or stream is not seekable.
>>> rw = open("/dev/tty", "r+")
>>> rw.write("hi")
>>> rw.flush()
hi>>> 

Python 3.7.3+ (heads/3.7-dirty:0a16bb15af, Apr  9 2019, 13:45:22) 
[GCC 8.3.1 20190223 (Red Hat 8.3.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> pty, tty = os.openpty()
>>> import io
>>> rw = io.open(pty, "r+")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
io.UnsupportedOperation: File or stream is not seekable.
History
Date User Action Args
2019-04-09 21:26:59cagneysetrecipients: + cagney, pitrou, benjamin.peterson, stutzbach, r.david.murray, python-dev, hynek, martin.panter, serhiy.storchaka, Dolda2000
2019-04-09 21:26:59cagneysetmessageid: <1554845219.2.0.320580655277.issue20074@roundup.psfhosted.org>
2019-04-09 21:26:59cagneylinkissue20074 messages
2019-04-09 21:26:58cagneycreate