Executing a file remotely

Ben Finney bignose-hates-spam at and-benfinney-does-too.id.au
Thu Feb 12 00:16:38 CET 2004

On 11 Feb 2004 15:20:41 -0800, Hank wrote:
> I was wondering how I would execute a file remotely?

That depends on how you'd execute any command on a remote machine.  On
Unix systems, the preferred way these days is to use ssh:

    bignose at desktop$ ssh bignose at remoteserver 'command -with -args'

Assuming the 'ssh' command is available on the local machine, you could
execute the above command within the Python script using os.system():


 \        "I washed a sock. Then I put it in the dryer. When I took it |
  `\                              out, it was gone."  -- Steven Wright |
_o__)                                                                  |
Ben Finney <http://bignose.squidly.org/>

More information about the Python-list mailing list