ataman rsh windows_pc hello.py fails
George Planansky
george_planansky at harvard.edu
Wed Apr 5 13:41:59 EDT 2000
Using ataman telnet and rsh to connect to an
nt 4.0 sp5 pc from solaris, I can get back
the output from a windows "dir" command, but
not from a "hello.py" script.
How do I fix this?
If I login in to the pc via "solaris% telnet ataman_pc",
hello.py works fine:
d:\home\atadmin>hello.py
hello
And rsh from the sun, invoking "dir" works fine:
solaris% rsh ataman_pc dir
Volume in drive D has no label.
Volume Serial Number is 04B8-D727
Directory of d:\home\atadmin
....
But not rsh with hello.py"
solaris% rsh ataman_pc hello.py
<I get nothing displayed back from the pc.>
However, the python scripts do in fact execute via rsh,
since e.g., with hello2.py
import sys
mylogfile = open('d:\\home\\atadmin\\hello2.txt', 'w')
sys.stdout = mylogfile
print 'hello2'
The invocation:
solaris% rsh atamin_pc hello2.py
does indeed create a hello2.txt on the pc,
with contents "hello2".
Ataman support suspects:
The difference between telnet and rsh (besides the obvious
ones) is that rsh just connects pipes to stdin and stdout.
Some programs detect that and behave somewhat differently.
Anyone know how to make the python script output
act like dir's output?
george_planansky at harvard.edu
More information about the Python-list
mailing list