1. If the user does not have .py files associated with the python interpreter (or associating it with something like paint or something stupid), Running a toolbox script with "Run Python Script in process" disabled. In 9.3.1 ArcGIS simply just invoked the file. However if .py files are not associated with the python interpreter, this causes some issues. (This is a huge issue at my university where we cannot modify file associations). Has it been changed so ESRI invokes python.exe <script>?(just to clarify, these scripts should be run "Run Python Script in Process" enabled.)Now just try two small tests. 2. Make a toolbox, make a script, with simply this:
# If this gives an exception, it indicates the script is being executed via eval/exec
__file__
lemme know what happens.3. Just modify the script from the above step and paste this, and run it.
import arcgisscripting
if __name__ == '__main__':
import timeit
gp = arcgisscripting.create()
gp.addmessage("TIME %s" % str(timeit.default_timer()))
Note the number, now wait ~15ish seconds. Run it again, what is the time value? In 9.3.1 this behavior is observed:
Executing: Script
Start Time: Wed Apr 07 01:56:34 2010
Running script Script...
TIME 2.0952383613e-006
Completed script Script...
Executed (Script) successfully.
End Time: Wed Apr 07 01:56:34 2010 (Elapsed Time: 0.00 seconds)
Executing: Script
Start Time: Wed Apr 07 01:56:52 2010
Running script Script...
TIME 17.3807963722
Completed script Script...
Executed (Script) successfully.
End Time: Wed Apr 07 01:56:52 2010 (Elapsed Time: 0.00 seconds)
The behavior observed above (Notice the TIME values), is not really what you would expect. Since you expect that a geoprocessor script starts then ends. In the past this has caused some serious issues, with a few libraries. and a few questions about arcpy4. Does dir() work? or are a lot of parameters still generated at run time?5. is arcpy running off the same .net based com interopt as arcgisscripting?6. Do stdout/stderr streams work when run through arcmap?7. Do assertion errors finally cause the geoprocessor script to abort?Thanks.