简体   繁体   中英

Unable to provide user input in PyDev console on Eclipse with Jython

I was trying to debug a jython program for a long time that I was running in Eclipse using the PyDev plugin, but it worked once I ran it from the terminal instead. I suspected it might be that the user input wasn't working on the Eclipse console, so I tried running the most basic input program for jython I could think of

name = raw_input("What is your name? ")
print "Hello %s" % (name)

When this runs it outputs

What is your name? 

and when I type in the console, the normal green text appears, but upon hitting enter, nothing happens. How can I get the console to feed the input back to the process?

EDIT: The input is fed to the program upon pressing Terminate, so it outputs

Hello name

Also, this is only happening when using PyDev, input works fine when running java code in the java perspective

This is really strange (and works for me).

So, to properly identify what's happening, I need some more info:

  1. What's the jython version you're using?

  2. Do you have something in your error log?

  3. What's the Eclipse version?

  4. How exactly are you doing the run? (hint: just pressing F9 should be enough)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM