python ftp files thread or multiprocess
<p>We continously generate data files from our database which are then FTP'D to different locations. We have a poler that continously monitors this folder and as soon as it sees files it FTP's them  </p>

<p>currently this process is sequential and when the files get large there is a backup which causes significant delay. I would like to process things in parallel i.e FTP multiple files at one times. I am not sure about threading/ multiprocessing and how this would work for me.</p>

<p>here is my code </p>

<pre><code>import ftplib
ftp = ftplib.FTP('domainname.com')
ftp.login("username","password")
infiles = [file1,file2,file3.....filen]
for x in infiles:
    f = open(x,'rb')
    ftp.storbinary('STOR %s' %x, f)
    f.close()
ftp.quit() 
</code></pre>

<p>I am thinking since this is I/O intensive Multiprocessing is the way to go, any ideas on how to proceed.    </p>
