New submission from sspapilin <sspapi...@gmail.com>: File test.py is
#!/usr/bin/env python import urllib2 print urllib2.urlopen('ftp://ftp.ripe.net/pub/stats/ripencc/delegated-ripencc-extended-latest').read() When I issue python test.py > out.txt , I get file about 100KB in size, the beginning of the actual file. I repeated it a hundred times, and almost every time I get 98305 byte file, and a couple of times a 49153 bytes or 188417 bytes file. When I replace urllib2 with urllib in test.py, I get full (4 MB) file. I have Ubuntu 12.04 64-bit, Python 2.7.3 (from default Ubuntu repository, up-to-date as of 4-june-2012) and slow, 64KB/s, Internet connection. However, I asked my friend with Windows and faster connection to check it, and he got partial download as well, while he had another size of partial file (50109 bytes). I do not know his OS ant Python versions. ---------- components: Library (Lib) files: test.py messages: 162287 nosy: sspapilin priority: normal severity: normal status: open title: urllib2 does not download 4 MB file fully using ftp type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file25821/test.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15002> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com