Re: Mystified

Sjoerd Mullender (Sjoerd.Mullender@cwi.nl)
Fri, 24 Feb 1995 09:58:57 +0100

I assume that you created the new file from within Python. Did you
close or at least flush the file before you did the rcp? It may be
that the file is still in the stdio buffer inside your Python program.

On Thu, Feb 23 1995 Robin Friedrich wrote:

> 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!

Sjoerd Mullender, CWI, P.O. Box 94079, 1090 GB Amsterdam, The Netherlands
E-Mail: Sjoerd.Mullender@cwi.nl; Phone: +31 20 592 4127; Fax: +31 20 592 4199
URL: http://www.cwi.nl/cwi/people/Sjoerd.Mullender.html