Lines of Python above cursor executing before enter is pressed twice

387
1
05-20-2013 09:07 AM
KatherineHayman
New Contributor
I am new to Python but I have been having an issue with the lines of code in the ArcMap Python window above where I am typing beginning to execute before I have completed everything and pressed enter twice.  My understanding is that ctrl-enter is pressed to create a new line, (and lines above should not do anything when this happens) and enter is then pressed twice when I am ready for the whole thing to execute.  This problem seems to be happening mainly when I use the up arrow to recall the last code snippet that was typed.  Is there a way to turn this off?
Tags (2)
0 Kudos
1 Reply
PeterWilson
Occasional Contributor III
Hi Katherine

I've come across the same as well. I've started to use PythonWin to type out my code as you need to select run before it will execute. Hopefully ESRI will remedy this error as well as allow you to insert a line of code between already typed code. Currently it will take you to the last line of code type and try to execute your code.

Regards
0 Kudos