[Pythonmac-SIG] blocksize problem? (ftplib)
JoanCarles p Casasín
joanca@typerware.com
Thu, 2 Mar 2000 12:45:27 +0100
Sean Hummel <seanh@unforgettable.com> wrote:
>
>On Wed, 1 Mar 2000, JoanCarles p Casas[ISO-8859-1] Ìn wrote:
>
>Well I'm not intimately familiar with the ftplib, but it looks as if you
>are trying to store the document as binary, when it is a text document.
>
>> #Erik guessed maybe has to do with the block size
>> #I've also tried 512, 2048 and 4096 and still missing
>> #something, different each time.
>> ftp.storbinary('STOR '+ docname, f, 1024)
>>
>> f.close()
>> ftp.close()
>>
Yes, but part of the document is transfered. And I also tried:
ftp.storlines('STOR ' + docname, f) and didn't worked either.
>Also, have you actually tried trapping the output with something like
>"OTSessionWatcher"? Just to make sure that ftplib is sending all the
>data?
ftplib sends data, but maybe not the whole thing.
I'm (very) beginner, I think I can imagine what the "OTSessionWatcher®"
should do but not sure to know how.
>Could just be a timing issue as well, try not closing the file "f",
>and seeing if the transfer works.
Actually I've tried your idea (don't closing the file) and didn't work.
:(
Thanks, any other idea?
JoanCarles
:::!!!:::
joanca@typerware.com
http://www.typerware.com