无法使用Jython在Eclipse上的PyDev控制台中提供用户输入 [英] Unable to provide user input in PyDev console on Eclipse with Jython

查看:140
本文介绍了无法使用Jython在Eclipse上的PyDev控制台中提供用户输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图调试一个jython程序很长一段时间,我使用PyDev插件在Eclipse中运行,但是一旦我从终端运行它,它就会工作。我怀疑可能是用户输入没有在Eclipse控制台上工作,所以我尝试运行最基本的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)

当它运行时输出

What is your name? 

当我输入控制台时,出现普通的绿色文本,但是一旦按下Enter键, 。如何让控制台将输入回馈给该过程?

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?

编辑:按下终止键将输入输入程序,因此输出

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

Hello name

另外,这只是在使用PyDev时发生,在Java透视图下运行java代码时,输​​入可以正常运行

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

推荐答案

奇怪(为我工作)。

所以,要正确地确定发生了什么,我需要一些更多的信息:

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


  1. 你使用的是什么jython版本?

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

你的错误日志中有什么?

Do you have something in your error log?

什么是Eclipse版本?

What's the Eclipse version?

(提示:只要按F9就够了)

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

这篇关于无法使用Jython在Eclipse上的PyDev控制台中提供用户输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆