Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Stdin in PyDev (Eclipse)
Stdin in PyDev (Eclipse) [message #1771305] Wed, 23 August 2017 20:35
Andrew D is currently offline Andrew DFriend
Messages: 1
Registered: August 2017
Junior Member
Hi,
I have problem with this script in Eclipse:

import stdio
import stddraw

# 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()

stddraw.setXscale(x0, x1)
stddraw.setYscale(y0, y1)

# Read and plot the points.
stddraw.setPenRadius(0.0)
while not stdio.isEmpty():
x = stdio.readFloat()
y = stdio.readFloat()
stddraw.point(x, y)

stddraw.show()


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)?

Thanks!
  • Attachment: usa.txt
    (Size: 369.42KB, Downloaded 73 times)
  • Attachment: one.py
    (Size: 0.55KB, Downloaded 60 times)
  • Attachment: stddraw.py
    (Size: 24.35KB, Downloaded 58 times)
  • Attachment: stdio.py
    (Size: 10.07KB, Downloaded 63 times)
Previous Topic:[Solved]At my wit's end to correct the error messages in Eclipse
Next Topic:PluginCustomization
Goto Forum:
  


Current Time: Tue Feb 18 03:02:55 GMT 2020

Powered by FUDForum. Page generated in 0.08665 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top