Suggest design to accomodate non-unix platforms ?

Grant Edwards invalid at invalid.invalid
Wed Apr 18 10:48:51 EDT 2012


On 2012-04-18, tinnews at isbd.co.uk <tinnews at isbd.co.uk> wrote:
> 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)
>> 
>> ... on a Windows box it will fail because 'ssh' isn't part of Windows.
>
> ssh isn't guaranteed to be part of Unix/Linux systems surely.

It's not absolutely, 100%, iron-clad guaranteed, but 

 * it's generally a pretty safe bet

 * it's usually trivial to install if it's not there

-- 
Grant Edwards               grant.b.edwards        Yow! Clear the laundromat!!
                                  at               This whirl-o-matic just had
                              gmail.com            a nuclear meltdown!!



More information about the Python-list mailing list