Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wrote the following code as a wrapper around messages pushed during the running of the script. Using Python IDLE this works fine, but in Eclipse I get the following output:

def ESRIP(gp,message):
    """Prints messages into ArcGIS Script window"""
    message = str(message)
    return message    

print ESRIP(gp, "processing one million points")

Any thoughts on how I can remove the weird text?

share|improve this question
I suggest changing the title of the question to "Geoprocessor AddMessage issue in Eclipse" for a bit more description. – om_henners Aug 5 '10 at 2:01
I can't seem to figure out how to change the title, I will be clearer in the future – GuidoS Aug 5 '10 at 14:20
up vote 4 down vote accepted

I've had the same issue. In those cases where it was really a problem, I just added a print for the message, and commented out the gp.AddMessage while I was testing in Eclipse, then uncommented it when moving it into ArcGIS.

Interestingly the gp.AddMessage works fine when run from the Python command line. Not sure where the extra characters are coming from (maybe AddMessage returns an unescaped string or something). I suspect it comes down to each interface's way of handeling unknown characters - command promt ignores them, IDLE doesn't print the string, and Eclipse tries to print the unknown characters.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.