Just guessing but are the files binary yet you are downloading them without declaring binary?<br><br><div><span class="gmail_quote">On 1/16/06, <b class="gmail_sendername">Peter A.Schott</b> <<a href="mailto:paschott@no.yahoo.spamm.com">
paschott@no.yahoo.spamm.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I download a lot of 4-6 KB files and regularly run into issues with files that
<br>don't get downloaded all the way or otherwise get corrupt.<br><br>I do something like:<br><br>RemoteList = nlstdir()<br>for filename in RemoteList:<br>  LocalFile = open(filename, "wb")<br>  LocalFile.write( "get file code here" )
<br>  LocalFile.close()<br>  #ftplib call to delete the remote file<br><br>I've tried to insert a pause into the code between the close and the remote<br>delete, but that doesn't seem to help.  For some reason it doesn't seem like the
<br>buffer is completely written or read before the remote delete is called.  That<br>leads to a file that's not 100% complete and thus can't be decrypted.<br><br>Any ideas on what to look for?  I don't have my exact code handy at the moment
<br>or I'd post some actual snippets.  It's also not consistent or it would be a<br>whole lot easier to troubleshoot.  :-)<br><br>Running Python 2.4.2 on Win32.<br><br>Thanks.<br><br>-Pete Schott<br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list">
http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div><br><br clear="all"><br>-- <br>"But
we also know the dangers of a religion that severs its links with
reason and becomes prey to fundamentalism" --  Cardinal Paul
Poupard<br>"It morphs into the Republican party!"  -- BJ