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?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Jun 30, 2015 at 20:43

1 Answer 1

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.

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
answered Jun 30, 2015 at 21:02
2
  • Thanks, but that just gets me a cryptic "Failed to execute" error. Commented 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. Commented Jun 30, 2015 at 22:51

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.