|Stdin in PyDev (Eclipse) [message #1771305]
||Wed, 23 August 2017 20:35
| Andrew D
Registered: August 2017
I have problem with this script in Eclipse:
# Read x and y scales from standard input, and configure standard
# draw accordingly. Then read points from standard input until
# end-of-file, and plot them on standard draw.
x0 = stdio.readFloat()
y0 = stdio.readFloat()
x1 = stdio.readFloat()
y1 = stdio.readFloat()
# Read and plot the points.
while not stdio.isEmpty():
x = stdio.readFloat()
y = stdio.readFloat()
I use file usa.txt (at attachments) as "Input file" in "Run configurations".
I get a black stddraw window which does not respond. If I type "Ctrl-Z" ("Ctrl-D" In Mac) in Eclipse console, then I get a result sometimes.
I've run this script in debugger - it stops on line of stdio.py (with operator "line = sys.stdin.readline()") for last line of usa.txt.
I run this script in Terminal ("python plotfilter.py < usa.txt"). It works.
I've run this file in Geany - it works!
Is it a bug in PyDeve (Eclipse)?
(Size: 369.42KB, Downloaded 75 times)
(Size: 0.55KB, Downloaded 62 times)
(Size: 24.35KB, Downloaded 62 times)
(Size: 10.07KB, Downloaded 68 times)
Powered by FUDForum
. Page generated in 0.03073 seconds