I\'m using fabric.api to run command in the remote machine. The snippet of my code looks like this:
import time import sys from fabric.api import * from fabr