Help FTP upload
Andre van Straaten
news at vanstraatensoft.com
Fri Nov 10 18:13:00 EST 2000
Janko Hauser <jhauser at ifm.uni-kiel.de> wrote:
> "Gilles Lenfant" <glenfant at equod.com.nospam> writes:
>> Hi,
>>
>> I try to make an FTP upload (Python 1.5.2/Win32) to a ProFTPD/Linux server:
>>
>> ftps = ftplib.FTP('ahost', 'anuser', 'apasswd')
>> ...
>> filename = 'anyfile.foo'
>> bufsize = 1024
>> fh = open(filename, 'r')
> On windows you need to open the file in binary mode with
> fh = open(filename, 'rb')
> HTH,
> __Janko
> --
> Institut fuer Meereskunde phone: 49-431-597 3989
> Dept. Theoretical Oceanography fax : 49-431-565876
> Duesternbrooker Weg 20 email: jhauser at ifm.uni-kiel.de
> 24105 Kiel, Germany
Yes, I had the same problem, and in a short test file were always the last 20
bytes missing.
-- avs
Andre van Straaten
http://www.vanstraatensoft.com
______________________________________________
flames please to /dev/null at vanstraatensoft.com
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
More information about the Python-list
mailing list