sys.stdin in Wing IDE problem

6 months ago by
Trying to test simple python-program using stdin object.
import sys

w = []
for s in sys.stdin:


To stop inputing I send EOF with right-button mouse click. But program terminates and nothing print out.
This situation is in Wing IDE 101 under MacOS and Windows.
So, I can't run and test any program that uses stdin.

How can I solve this problem?

1 Answer

6 months ago by
That program doesn't work outside of wing either.

If you are writing test code, try putting your inputs into a file and reading from the file.  Then you can use UnitTest instead of typing the same inputs over and over

But the problem with the above program is not wing.
It's strange, but this program works good.
Here is a screenshot.

In bash I can stop inputting sending Ctrl+D.

And this is from Wing

And here is video from PyCharm
written 6 months ago by Alexander Pavolotsky 
Please login to add an answer/comment or follow this question.

Similar posts:
Search »