Because your addMessage & print statements are indented, they are being executed during each iteration of the for loop. Remove the indent, and they will only execute at the conclusion of the script.

The most likely reason no messages are being displayed is that no errors are occurring. Level 0 messages are normal, level 1 messages are warnings, and level 2 messages are critical errors. If you want to see all messages that occurred during the script, remove the error level: gp.getmessages().

Because your addMessage & print statements are indented, they are being executed during each iteration of the for loop. Remove the indent, and they will only execute at the conclusion of the script.

The most likely reason no messages are being displayed is that no errors are occurring. Level 0 messages are normal, level 1 messages are warnings, and level 2 messages are critical errors. If you want to see all messages that occurred during the script, remove the error level: gp.getmessages().