在ipython Notebook中读取输入值 [英] Reading input values in ipython notebook

查看:57
本文介绍了在ipython Notebook中读取输入值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当尝试使用像python这样的input()函数使用ipython笔记本从键盘输入值时,都会产生错误.

whenever trying to input values from keyboard using ipython notebook using the input() function like python, it gives error.

EOFError                                  Traceback (most recent call last)
<ipython-input-1-725a22d6f154> in <module>()
     8 #Reads three Input values for x,y and z
     9 print "Enter Values of x, y, z :- "
---> 10 x = input()
     11 y = input()
     12 z = input()

EOFError: EOF when reading a line

在python中同样可以正常工作.如何在ipython笔记本环境中做到这一点?

the same works correctly in python. how can I do this in ipython notebook environment?

提前谢谢.

推荐答案

使用 raw_input .(还有更多字符,因此SO允许我发布答案)

Use raw_input. (and some more chars so the SO allow me to post the answer)

这篇关于在ipython Notebook中读取输入值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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