Suggest design to accomodate non-unix platforms ?

Chris Rebert clp2 at rebertia.com
Wed Apr 18 10:52:14 EDT 2012


On Wed, Apr 18, 2012 at 6:35 AM, Richard Shea <shearichard at gmail.com> wrote:
> On a *nix box this is a reasonable bit of Python :
>
> cmd = "ssh -o StrictHostKeyChecking=no -i %s %s@%s '%s' > %s" % (key,
> user, dns, "echo CONNECTION READY", tmp_file)
> result = os.system(cmd)

It's slightly less reasonable considering that the `subprocess` module
is preferred over os.system().

Cheers,
Chris



More information about the Python-list mailing list