[Python-Dev] Need Help w/ Telnet Problem
Paul Ammann
pammann@execomm.net
Mon, 11 Mar 2002 13:28:20 -0800
Hi
I've been going crazy with this problem for quite some times now, and really
need another opinion.
If I open a Telnet session to another machine, is there a way that I can
issue a command and return the result a varible? For example, if I want to
find all the processes that have python:
ps -aux | grep python
However, I would want to assign that to a variable such as:
pythonProcess = telnet.write("ps -aux | grep python")
Or, does anyone know of a better way to remotely monitor a UNIX process on a
remote machine.
Please forgive me for this... but I know Perl has a $telnet->cmd($command)
that allows a scripter to issue a command to a remote server and wait for a
reponse.
Thank you in advance for any assistance.
Best regards,
Paul