Problem with stdin in python script (macOS)
9 months ago by
I have problem with this script in WingIDE:
I use this file:
as "Run arguments" in "Launch configurations" (< usa.txt).
I run this file, but nothing happens.
If I run this file in Geany - it works.
It works in Terminal too (python plotfilter.py < usa.txt)
Is it my mistake or bug in WingIDE?
Community: Wing Python IDE
8 months ago by
import sys from StringIO import StringIO # In Python 3 it's from io import StringIO instead f = open('usa.txt') txt = f.read() f.close() sys.stdin = StringIO(txt)
Please login to add an answer/comment or follow this question.