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
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.
while not stdio.isEmpty():
x = stdio.readFloat()
y = stdio.readFloat()
stddraw.point(x, y)

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 (with operator "line = sys.stdin.readline()") for last line of usa.txt.

I run this script in Terminal ("python < usa.txt"). It works.
I've run this file in Geany - it works!

Is it a bug in PyDeve (Eclipse)?

  • Attachment: usa.txt
    (Size: 369.42KB, Downloaded 75 times)
  • Attachment:
    (Size: 0.55KB, Downloaded 62 times)
  • Attachment:
    (Size: 24.35KB, Downloaded 62 times)
  • Attachment:
    (Size: 10.07KB, Downloaded 68 times)
Previous Topic:[Solved]At my wit's end to correct the error messages in Eclipse
Next Topic:PluginCustomization
Goto Forum:

Current Time: Mon Mar 30 19:35:13 GMT 2020

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

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

Back to the top