I have a python script on a remote machine which I want to execute from my local machine. It takes in a few arguments and this is how I would run it if I were to run it on t
I recommend you look at the plumbum module for doing things like this.
Its a pretty cool and easy way to run local commands and you can do the same with remote commands quite easily (with a context manager).
Have you considered using Fabric? It's really easy to use.