Articles

ftp.retrbinary() help

January 14, 2011 at 06:46:28
Specs: Macintosh

Hello everyone,

I am a newbee on python. I have created a python script to connect to a remserver.

[CODE]datfile = []
for dk in range(len(files)):
dfnt=files[dk]
dpst=dfnt.find('.dat')
if dpst == 15:
dlist = dfnt[:]
datfile.append(dlist)[/CODE]

datfile is

['a.dat','b.dat']

which as you can see create a list. now I am passing this list to

[CODE]ftp.retrbinary('datfile')[/CODE]

but this lines returns an error:

typeerror: retrbinary() takes at least 3 arguments (2 given)

not sure what is looking for? thanks in advanced for anyhelp


See More: ftp.retrbinary() help

Report •


#1
January 14, 2011 at 07:01:49

First lesson of learning a language: Become familiar with the documentation.

How To Ask Questions The Smart Way


Report •

#2
January 14, 2011 at 11:45:47

I did read the manual, and I got the impression i could use a 'LIST'.

I guess that I should code something like this then

for jj, kk in enumerate(datfile):
ftp.retrbinary('kk')

any better?


Report •

#3
January 14, 2011 at 12:10:14

Using the link I provided, show me how that fits the definition.

How To Ask Questions The Smart Way


Report •

Related Solutions

#4
January 14, 2011 at 13:49:31

I asked for help cos I did not understand the explanation in the docs.

I good programmer like you should know that forums are made for this purpose, to help others to learn.


Report •

#5
January 14, 2011 at 14:08:46

I'm helping you learn how to think. It's not the lesson you want, but it's important. Lashing out isn't going to do anybody any good.

How To Ask Questions The Smart Way


Report •

#6
January 14, 2011 at 15:46:08

I am not looking for a solution, I am looking for clarification. defo you are a very good programmer so help me think explaining what i am missing out

Report •

#7
January 16, 2011 at 06:42:43

Go here to see examples on how to use ftp.retrbinary

GNU win32 packages | Gawk


Report •

#8
January 18, 2011 at 00:03:15

Thanks for the reference ghostdog

Report •


Ask Question