Senthil Kumaran <orsent...@gmail.com> added the comment:

If you want to quickly solve this, do like this:

import urllib
import tarfile

tarfile.open(urllib.urlretrieve('http://plugins.supybot-fr.tk/GoodFrench.tar')[0],
 mode='r:') # Works

The problem is tarfile is expecting a "file-object" with a tell method for 
seeking, whereas urllib2 returns a file-like object, which does have a tell 
method. It seems to not have because, the underlying socket._fileobject is not 
exposing one (for whatever reason). Let me try to figure out reason for 
fixing/closing this bug.
(BTW, http module is relying on .tell() of the socket._fileobject too and I 
wonder it did not get noticed earlier because the has not taken that path yet? 
Strange!)

----------
assignee:  -> orsenthil

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10362>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to