lbromley

how to edit / import / update Python scripts in 10.1

Discussion created by lbromley on Aug 23, 2012
Latest reply on Sep 6, 2012 by robertwjones
I have various scripts written in ArcMap 10. I need to make the minor changes so they function in 10.1, and the script editing process has seemingly changed in significant ways. Previously in 10.0 I simply edited my script in PythonWin and saved it, then right clicked the script in ArcMap Catalog window and selected 'Import Script' to ingest the new changes. This worked fine.

Now, however, I cannot import the script once I edit (option is generally greyed out), nor can I change the script source via its Properties. The documentation tells me to right click a script, select 'Edit' (after designating my editor in Geoprocessing Options), then edit my script, and then save the script. However, these changes are not ingested / reflected when I run the script, ie its running the original and unedited version. Also, when I save the script in PythonWin, the 'Save As' dialogue box pops up and the default save location is something like 'C:\tmp\arc4B75\tmp2B11.py' which doesn't seem right to me.

At present I am generally making a new tool and add the script fresh, obviously a problem for tools with parameters. Also, at some mysterious times I can re-import the script but am not sure what triggers the ability to do this.

Lastly, during this process my PythonWin Interactive Window will display messages such as:

he file 'c:\tmp\arc4B75\tmp2B11.py' is open for editing, but
checking it for changes caused the error: The system cannot find the path specified
The file 'c:\tmp\arc58B0\tmp7517.py' is open for editing, but
checking it for changes caused the error: The system cannot find the file specified
The file 'C:\tmp\arc58B0\tmp7517.py' has re-appeared - continuing to watch for changes...
The file 'c:\tmp\arc58B0\tmp5F2.py' is open for editing, but
checking it for changes caused the error: The system cannot find the file specified


Can anyone help?

Signed,
Frustrated

Outcomes