Execute a command on remote machine in python

2011-11-15 Thread Roark
Hi, I am first time trying my hands on python scripting and would need some guidance from the experts on my problem. I want to execute a windows command within python script from a client machine on a remote target server, and would want the output of the command written in a file on client

Re: Execute a command on remote machine in python

2011-11-15 Thread Martin P. Hellwig
On 11/15/11 12:04, Roark wrote: Hi, I am first time trying my hands on python scripting and would need some guidance from the experts on my problem. I want to execute a windows command within python script from a client machine on a remote target server, and would want the output of the

Re: Execute a command on remote machine in python

2011-11-15 Thread Jean-Michel Pichavant
Martin P. Hellwig wrote: On 11/15/11 12:04, Roark wrote: Hi, I am first time trying my hands on python scripting and would need some guidance from the experts on my problem. I want to execute a windows command within python script from a client machine on a remote target server, and would

Re: Execute a command on remote machine in python

2011-11-15 Thread Chris Angelico
On Tue, Nov 15, 2011 at 11:04 PM, Roark suha...@gmail.com wrote: Hi, I want to execute a windows command within python script from a client machine on a remote target server, and would want the output of the command written in a file on client machine. What is the way it could be achieved.

Re: Execute a command on remote machine in python

2011-11-15 Thread Xavier Ho
It sounds like Fabric is what you're after. We use it at work and it's the best thing since ssh. ;] http://docs.fabfile.org/en/1.3.2/index.html (Actually, it uses ssh internally and allows you to do remote shell-like programming in a pythonic fashion.) Cheers, Xav On 15 November 2011 22:04,

Re: Execute a command on remote machine in python

2011-11-15 Thread Roy Smith
In article mailman.2728.1321366254.27778.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Tue, Nov 15, 2011 at 11:04 PM, Roark suha...@gmail.com wrote: Hi, I want to execute a windows command within python script from a client machine on a remote target server, and

Re: Execute a command on remote machine in python

2011-11-15 Thread Marco Nawijn
On Nov 15, 1:04 pm, Roark suha...@gmail.com wrote: Hi, I am first time trying my hands on python scripting and would need some guidance from the experts on my problem. I want to execute a windows command within python script from a client machine on a remote target server, and would want

Re: Execute a command on remote machine in python

2011-11-15 Thread Rodrick Brown
You could easily script this with popen calling secure shell to execute a command and capture the output. Sent from my iPhone On Nov 15, 2011, at 7:04 AM, Roark suha...@gmail.com wrote: Hi, I am first time trying my hands on python scripting and would need some guidance from the experts