def ssh(host, cmd):
 proc = sp.Popen(['ssh', host], stdin=sp.PIPE)
 proc.stdin.write(cmd)
 proc.wait()

def ssh ( host , cmd ) : proc = sp . Popen ( [ 'ssh' , host ] , stdin = sp . PIPE ) proc . stdin . write ( cmd ) proc . wait ( )
runs a command on a given machine .