"pedro" <pedrooconn...@gmail.com> wrote

Hi, does anyone know how to send a command that is within a python script to another computer's terminal. This is what it looks like in Applescript.

tell application "Terminal" of machine "eppc://USERNAME:passw...@computer2.local"
do script "ls"
end tell


You might be better asking these kind of questions on the MacPython mailing lists/forums since more folks there will be familiar with what are fairly MacOS specific issues. Also you can get Python to talk to Applescript which might be the easiest way...

However in a general sense you can use ssh (or rsh?) to do that.
You might also be able to avoid using subprocess or os.system by mounting the remote filesystem? That would let you you
os.listdir() on the remote machine?

HTH

--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to