FTP anomaly
Steve Holden
steve at holdenweb.com
Thu Oct 28 12:02:32 EDT 2004
Kyle Odom wrote:
> I'm trying to automate some things at work and something I do a lot if
> FTP some files back and forth. I've got this all done in python just
> fine, but I noticed a huge difference in file sizes. One particular
> binary file comes over at roughly two megs when I transfer it via ftp
> from the command line (running XP.) When I get it via my python
> script, it's nine megs! Any clue why? I haven't tried using the file
> in my work because I don't want to break anything.
> Fairly new to Python, be kind to me :)
> Thanks!
> KO
You will possibly find that when you transfer the file using the command
line it's being truncated because you didn't set binary mode, and that
Python is giving you ALL the data.
Just a theory. Otherwise I'd need to see some code ...
Obviously it would also be helpful to check the file sizes the server
reports in a DIR command and see whether either transfer method conforms.
regards
Steve
--
http://www.holdenweb.com
http://pydish.holdenweb.com
Holden Web LLC +1 800 494 3119
More information about the Python-list
mailing list