1

I am trying to automate the aws instance setup using boto. I have a python script in which I will do the ssh to the instance. After ssh,I am executing a python function which is in remote python file using shell command( python -c "filename").I am unable to get the output until the python execution gets complete. How can we get the real time output then and there from the remote python script?

  • Are you sure the command outputs anything while it is running? It may not be flushing its output. – jedberg Feb 25 '16 at 1:36
  • The python script which I call outputs while running. Is there anyway to flush the output of the python to the shell I call from my local python script? – Abinaya Sadhasivam Feb 25 '16 at 4:23
0

You can try this:

ssh -q -o StrictHostKeyChecking=no user@host "python -c python-script.py"
| improve this answer | |

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.