Message393561
A workaround consists in replacing fd(0) with /dev/tty without modifying sys.stdin
import os
stdin = os.dup(0)
os.close(0)
tty = os.open("/dev/tty", os.O_RDONLY)
assert tty == 0
import readline
print("input:", input())
print("in:", os.read(stdin, 128)) |
|
Date |
User |
Action |
Args |
2021-05-13 07:34:41 | piwi | set | recipients:
+ piwi, mwh, loewis, agthorr |
2021-05-13 07:34:41 | piwi | set | messageid: <1620891281.58.0.965785030498.issue512981@roundup.psfhosted.org> |
2021-05-13 07:34:41 | piwi | link | issue512981 messages |
2021-05-13 07:34:41 | piwi | create | |
|