After using stdin.read()/stdin.readlines()/stdin.readlines(), every following input will not work(it will show off EOF error,) beacuse input() is set to prevent the EOF reading. However, isn't there any way to clean the sys.stdin() buffer? code sample
Asked
Active
Viewed 26 times
-4
-
That doesn't make sense. Why are you trying to interact with stdin in this way? – user2357112 Jul 17 '21 at 11:50
-
If a program reads `stdin` until it reaches EOF, that is a pattern where the program runs to completion from a command line and its input has been redirected to `stdin` using ` – BoarGules Jul 17 '21 at 12:18
1 Answers
-1
Here is the link to the Delete Post
input() after readlines() from sys.stdin?
the answer is no, but there may be a way to re-construct your input by using wsvcrt module
Just In Case For The Deleted Page Will Never Be Seen
Anthony
- 9
- 2