storlines reads a text file one line at a time, and 8192 is the maximum size of each line. You should probably use it since the heart of your download function is:
with open(str_param_filename, 'rb') as ftpup: ftp.storbinary('STOR ' + str_param_filename, ftpup) ftp.close()
This reads and saves in binary form one block at a time (8192 by default), but should work fine for files of any size.
Alex martelli
source share