what does "lost sys.stdin" error mean?
lyndiechiou at gmail.com
Thu Jun 11 23:50:32 CEST 2009
I have a very simple program from the first chapter of a book on
python 3 (I'm a novice). I called the program tmp.py and the data
input file is sum.dat (just a list of numbers, 1 per line). When I
type into my command shell "tmp.py < sum.dat" I get an error from
"line=input()" -- that's line 7 from the code below. The exact error
RuntimeError: input(): lost sys.stdin.
print("Type integers, each followed by Enter; or ^D or ^Z to finish")
total += number
count += 1
except ValueError as err:
print("count =", count, "total =", total, "mean =", total/
More information about the Python-list