help please- ftplib

gony at my-dejanews.com gony at my-dejanews.com
Sun May 16 08:28:28 EDT 1999


oky doky, form my last post i have progressed

I can now retrieve files from the server using "retrbinary"

now i'm trying to send files to the server from my machine heress the
code i'm using and the error i get:


>>> from ftplib import FTP
>>> ftp = FTP('s3.virtualave.net','gony','********')
>>> ftp.storbinary('STOR test.txt', open('test.txt', 'r').read)
Traceback (innermost last):
  File "<pyshell#2>", line 1, in ?
    ftp.storbinary('STOR test.txt', open('test.txt', 'r').read)
TypeError: not enough arguments; expected 4, got 3
>>>

and if i put in the blocksize variable ie

ftp.storbinary('STOR test.txt', open('test.txt', 'r').read, 1)

it crashes python

can anyone help out as to what the fourth variable is and where it sits
in the function call


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---




More information about the Python-list mailing list