Select to view content in your preferred language

Lists: Variables with more than one value - Runtime error<type'...EOFerror> Why?

923
2
08-30-2012 12:38 PM
ScottChang
Deactivated User
Hi all,
In the Python Window of my ArcGIS 10.0, I executed the following code:
>>> which_one = input("what month (1-12)? ")\
Runtime error <type 'exceptions.EOFError'>: EOF when reading a line

Please help and tell me why I got the error and how to correct the problem.

Thanks,
Scott Chang
Tags (2)
0 Kudos
2 Replies
JasonScheirer
Esri Alum
You can't use input or raw_input in the Python window in ArcMap. If you'd like to manage user input, rewrite your script as a Python script tool. If you're using the Python window as a learning tool, try using another one like Idle instead.
0 Kudos
ScottChang
Deactivated User
Hi Jason,  Thanks for your response.

First, I guess that the Python Window of my ArcGIS 10.0 (after the >>>, typing Import arcpy, Import os, ...) is the interactive mode of IDLE. Am I right in this guessing or not?  Secod, I saw "Python Shell" in my 2 books. But, I don't know how I can get the "Python Shell" started from the Python Window of my ArcGIS 10.0 !!?? 

I checked the 2 Python books I have and I saw they mention (1) interactive mode of IDLE and (2) script mode of IDLE in the regular Python programming. But in the Python Window of my ArcGIS 10.0,  I don't know how to rewrite my script as a Python script tool or to try using IDLE like (1) or (2).  Please kindly help, tell me how to do the things you suggested, and respond again.

Thanks,
Scott Chang

P. S.  I have Python version 2.5 in my PC for long time. But I have not used it at all.  Is Python version 2.5 still good to do "Lists", etc.?
0 Kudos