New submission from keakon: I found the bug from this slide: http://sector.ca/Portals/17/Presentations15/SecTor_Branca.pdf
The second way cannot fully read the file. import urllib2 url = 'ftp://ftp.ripe.net/pub/stats/ripencc/delegated-ripencc-extended-latest' response = urllib2.urlopen(url) data = response.read() print len(data) # 6653498 data = urllib2.urlopen(url).read() print len(data) # 65536 It might be something wrong with the FTP server. It's OK when I read from my own FTP server. ---------- components: Library (Lib) messages: 254733 nosy: keakon priority: normal severity: normal status: open title: urllib2 cannot fully read FTP file type: behavior versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25635> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com