On Tuesday 08 February 2005 13:26, Simon Anders wrote:
> This is what I was about to reply as well. But I did a short test
> program and encountered a problem:
>
> import os
> fi, foe = os.popen4 ('ssh dopey')
> print >>fi, 'ls'
> fi.close () # <-- this is annoying
> for line in foe:
> prin
Simon Anders wrote:
Hi
Laszlo Zsolt Nagy wrote:
[EMAIL PROTECTED] wrote:
How can python connect to server which use SSH protocol?
There should be a better way.
Simon
There is : pexpect! http://pexpect.sourceforge.net/
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> How can python connect to server which use SSH protocol?
> Is it easy since my python has to run third party vendor, write data,
> read data inside the server (supercomputer).
>
> Any suggestion?
>
> Sincerely Yours,
> Pujo Aji
Pujo,
There are two Python oriented SSH s
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
Hi
Laszlo Zsolt Nagy wrote:
[EMAIL PROTECTED] wrote:
How can python connect to server which use SSH protocol?
Is it easy since my python has to run third party vendor, write data,
read data inside the server (supercomputer).
In advance, I'm not sure if I understood your problem. SSH is clearly
[EMAIL PROTECTED] wrote:
How can python connect to server which use SSH protocol?
Is it easy since my python has to run third party vendor, write data,
read data inside the server (supercomputer).
Any suggestion?
you can use popen around the ssh binary.
You man need the pty module if you want to de
[EMAIL PROTECTED] wrote:
How can python connect to server which use SSH protocol?
Is it easy since my python has to run third party vendor, write data,
read data inside the server (supercomputer).
In advance, I'm not sure if I understood your problem. SSH is clearly a
remote
shell. You will be
How can python connect to server which use SSH protocol?
Is it easy since my python has to run third party vendor, write data,
read data inside the server (supercomputer).
Any suggestion?
Sincerely Yours,
Pujo Aji
--
http://mail.python.org/mailman/listinfo/python-list