import os fi, foe = os.popen4 ('ssh dopey') print >>fi, 'ls' fi.close () # <-- this is annoying for line in foe: print line, foe.close ()
The above connects to a server, passes the command 'ls', which is executed there, and prints the returned result.
However, reading from foe succeeds only if fin has been closed before. An fi.flush() seems to be not sufficient.
Hmm. Is it possible to use ssh for simple port forwarding (-L option) and write a server program on the remote machine?
-- _________________________________________________________________ Laszlo Nagy web: http://designasign.biz IT Consultant mail: [EMAIL PROTECTED]
Python forever!
-- http://mail.python.org/mailman/listinfo/python-list