srinivasan srinivas wrote:

> This is wat i am doing :
> 
> args = [ "SSH", <hostname>,  <script_name>]
> I am giving this to subprocess.Popen()
> Thanks,
> Srini

Then the answer is simple: how would you figure out the remote process pid
using ssh? Once you found that out, pass that to Popen. Make sure you
capture stdout of the Popen-class to get the answer.

Something like

ps aux | grep <script_name> | grep -v grep | awk '{print $2}'

should be the command.

Diez
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to