does not work on freeBSD but works on linux, and windows

David Bolen db3l at
Wed Jun 30 02:02:00 EDT 2004

John fabiani <jfabiani at> writes:

> 2.  below is a simple ftp program
> import ftplib
> import sys
> remote=ftplib.FTP(host='myIpAddress',user='username',passwd='password')
> mohpac07=open("/usr/home/spx/servplus/outbounds/mohpac07.dbf",'rb')
> remote.set_debuglevel(2)
> remote.set_pasv(0)
> remote.storbinary("STOR mohpac07.dbf",mohpac07,8192)
> remote.close
> remote.quit

Just a shot in the dark, but if your last two lines are accurate,
you're simply referencing the close and quit names within the ftplib
object, but aren't actually calling them.  Also, quit() includes the
close operation, so I think you'd want that to end with:


Note that your log never shows the Goodbye during a clean exit from
the server.

It's possible that the platform differences you are seeing has to do
with differences in buffering at the application and/or protocol stack
layer and perhaps how stranded data is handled during process/socket
shutdown.  It's possible that the final portion of the data related to
the STOR is never getting transmitted to the remote ftp server.

-- David

More information about the Python-list mailing list