3

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

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 Jun 30 '15 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 Jun 30 '15 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.