[Tutor] ftplib

Andres Gelabert andresg@umich.edu
Tue, 6 Jun 2000 01:43:52 -0400

By all means:

from ftplib import FTP
ftp = FTP()
ftp.login("AccountOnOtherServer", "CorrespondingPassword")
ftp.retrbinary("retr DesiredFile", open("DesiredFile", "wb").write)

# The above results in the file's successful transfer
# Now, I try only one of the following, with the described respective errors


----- Original Message -----
From: Remco Gerlich <scarblac@pino.selwerd.nl>
To: <tutor@python.org>
Sent: Monday, June 05, 2000 5:01 AM
Subject: Re: [Tutor] ftplib

> On Mon, Jun 05, 2000 at 03:51:42AM -0400, Andres Gelabert wrote:
> > Greetings,
> > I'm new to both Python and this list.  My first program involves using
ftp to transfer files from one NT server to another one.  The files transfer
successfully, but the quit() command produces "TypeError: call of
non-function (type string)," whereas close() and sendcmd('bye') produce
> > I'd appreciate someone's pointing out what I'm doing wrong.
> Could you post some code where you have the problem?
> --
> Remco Gerlich,  scarblac@pino.selwerd.nl
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://www.python.org/mailman/listinfo/tutor