On 2009-08-11 05:27:19 -0400, "Alan Gauld" <alan.ga...@btinternet.com> said:
"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
Hi Alan, I am trying to make my code as cross-platform as possible, so
I am trying to avoid Applescript altogether. I'll try out your ssh
suggestion and mounting the remote filesystem?
Thanks
Pete
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor