hosts = [hosts.create_host(h) for h in machines] for host in hosts: print host.hostname print host.run('uname -a').stdout.rstrip()