[NEWBIE] ftplib again...
Bruce Dykes
bkd at graphnet.com
Thu Feb 7 10:00:09 EST 2002
Okay...I've got the ftp connections working...thing is, when I did my
initial prototyping, I used a local file, and readlines() to get the data
from the file into a list, and to create the function to parse out the
useful data from noise. Well it worked as far as getting the processing
logic down, but now that I'm trying from ftp'ed files, well...
All I need to do is get the file contents into a list. That's it. Now it
looks as if retrlines("RETR filename") will do that, with some additional
manipulations.
But it doesn't. Every single variation I've tried,
dataset=[host.retrlines("RETR filename") ], host.retrlines("RETR filename",
dataset.append) , dataset=list(host.retrlines("RETR filename") ), etc.
always results in the file contents getting dumped to the
console/stdout/interactive window, and the completion code, '226 Command
Completed Successfully' getting assigned to the variable.
What am I missing? Do you need to see more of my code?
thanks in advance...
bkd
More information about the Python-list
mailing list