Python FTP and Streams -
i need create "turning table" platform. server must able take file ftp , send ftp b. did lot of file transfer systems, have no problem ftplib, aspera, s3 , other transfer protocols.
the thing have big files (150g) on ftp a. , many transfers occur @ same time, , many ftp servers or other.
i don't want platform store these files in order send them location. don't want load in memory either... need "stream" binary data b, minimal charge on transfer platform.
i looking @ https://docs.python.org/2/library/io.html readbuffer , writebuffer, can't find examples , documentation sorta cryptic me...
anyone has starting point?
buff = io.open('/var/tmp/test', 'wb') def loadbuff(data): buff.write(data) self.ftp.retrbinary('retr ' + name, loadbuff, blocksize=8)
so data coming in buff, <_io.bufferedwriter name='/var/tmp/test'> object, how can start reading while ftplib keeps downloading?
hope i'm clear enough, idea welcomed.
thanks
Comments
Post a Comment