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
l...@gustaebel.de
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to