I have a Python script that runs a shell command on a remote server (using the Fabric module). When I run the tool in the debugger, I see all the output scrolling, as the command can take hours to run. I have created an ArcMap tool to run from the ArcToolbox, but I cannot see the progression of the shell command's output. The geoprocessing window just stays open until finished. Is there anyway to send the shell output to the geoprocessing window in real time?
1 Answer 1
When you created your script tool you would have gone through that wizard to wire up your script to a tool interface. At the stage where you point it to the script python file (.py) there is a check box which is usually un-ticked which is Show command window when executing script, try ticking that on.
-
Thanks, but that just gets me a cryptic "Failed to execute" error.Blazinator– Blazinator2015年06月30日 21:42:47 +00:00Commented Jun 30, 2015 at 21:42
-
This is the only realistic way of doing it. You could try subprocess.Popen() to run the remote script stackoverflow.com/questions/13398261/… and get the stdout but it's essentially the same thing with worse response time. You need to work on the "Failed to Execute" but without seeing any code I wont even hazard a guess.Michael Stimson– Michael Stimson2015年06月30日 22:51:41 +00:00Commented Jun 30, 2015 at 22:51