Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reading input values in ipython notebook

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

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

thanks in advance.

like image 674
reshmi g Avatar asked Oct 04 '22 06:10

reshmi g


1 Answers

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

like image 160
Matt Avatar answered Oct 12 '22 11:10

Matt