Select to view content in your preferred language

Why Runtime error EOF when reading a line with INPUT function

2926
2
01-17-2012 01:47 AM
CarmeCaum
New Contributor
Hi everybody,

I need to program a function that asks to the user for the values of some of its parameters.
I simply wrote and execute the Python prompt from ArcGIS 10:

x= input("Enter the number of rows")

I get:
Runtime error <type 'exceptions.EOFError'>: EOF when reading a line


It is really strange because it works correctly in Python 2.6 that has been installed with ArcGIS 10.

Any ideas?

Thanks in advance!


Carme
Tags (2)
0 Kudos
2 Replies
JakeSkinner
Esri Esteemed Contributor
Hi Carme,

If you are creating a custom tool to use within ArcMap, you should consider using the arcpy.GetParameterAsText function.  Here is some further information on how to set a script tool's parameters.
0 Kudos
CarmeCaum
New Contributor
Hi!

Good point...I hadn't realized that it was that great tool...thanks 🙂

Carme
0 Kudos