On Thu, Feb 11, 2016 at 04:41:43PM +0000, Ulli Horlacher wrote:
> sfo = sock.makefile('r')
> taro = tarfile.open(fileobj=sfo,mode='r|')
> taro.extractall(path=edir)
What about using an iterator?
def myiter(tar):
for t in tar:
print "extracting", t.name
yield t
sfo = sock.makefile('r')
taro = tarfile.open(fileobj=sfo,mode='r|')
taro.extractall(members=myiter(taro),path=edir)
Cheers,
--
Lars Gustäbel
[email protected]
--
https://mail.python.org/mailman/listinfo/python-list
