Message339809
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. |
|
Date |
User |
Action |
Args |
2019-04-09 21:26:59 | cagney | set | recipients:
+ cagney, pitrou, benjamin.peterson, stutzbach, r.david.murray, python-dev, hynek, martin.panter, serhiy.storchaka, Dolda2000 |
2019-04-09 21:26:59 | cagney | set | messageid: <1554845219.2.0.320580655277.issue20074@roundup.psfhosted.org> |
2019-04-09 21:26:59 | cagney | link | issue20074 messages |
2019-04-09 21:26:58 | cagney | create | |
|