[issue512981] readline /dev/tty problem

2022-04-10 Thread admin
Change by admin : -- github: None -> 36029 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue512981] readline /dev/tty problem

2021-05-13 Thread Pierre
Pierre added the comment: 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)) --

[issue512981] readline /dev/tty problem

2021-05-10 Thread Pierre
Pierre added the comment: Please, let me know if I should re-open a new bug for this one. -- ___ Python tracker ___ ___ Python-bug

[issue512981] readline /dev/tty problem

2021-05-01 Thread Pierre
Pierre added the comment: I suggest to reopen this issue as there was a regression with python3. import sys sys.stdin = open("/dev/tty", "r") import readline print(input()) Write some text and press left. Expected: the cursor goes left. Actual: prints '^[[D' as is readline had not been import