Mystified

Robin Friedrich (friedric@rose.rsoc.rockwell.com)
23 Feb 1995 20:25:37 GMT

Ok this is a stumper. I'm using Python 1.1.1 on Sun Solaris and trying
to write some admin scripts. During testing I am encountering this
behavior...

For some reason the system command malfunctions when trying to issue
an rcp command. e.g.
system('rcp /tmp/dfstab maxwell:/tmp/dfstab')
is supposed to copy a local file back to the host it came from
after I made some edits in the script. This command works fine
from the shell _and_ when issued from the interactive python prompt,
but only creates a zero size file for maxwell:/tmp/dfstab when this
same statement is issued from a running script.
The results on the remote machine look like this:

-rw-r--r-- 1 friedric admin 0 Feb 23 13:19 dfstab
-rw-r--r-- 1 friedric admin 350 Feb 23 12:13 dfstab.bak

rather than the correct
-rw-r--r-- 1 friedric admin 291 Feb 23 13:01 dfstab
-rw-r--r-- 1 friedric admin 350 Feb 23 12:13 dfstab.bak
after the copy.

No exceptions are raised and the script thinks it did it's thing fine.
Is there some wierd shell interaction I'm not understanding or is this
a bug? BTW: the system('rcp maxwell:/tmp/dfstab /tmp/dfstab') worked
fine earlier in the same script to pull the file over in the first place!