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?
Asked
Active
Viewed 549 times
2
-
Are you sure the command outputs anything while it is running? It may not be flushing its output. – jedberg Feb 25 '16 at 01: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 04:23
1 Answers
1
You can try this:
ssh -q -o StrictHostKeyChecking=no user@host "python -c python-script.py"
Peycho Dimitrov
- 988
- 7
- 9