请高手指教,谢谢啦!
1 个解决方案
#1
import tarfile
tar = tarfile.open(“/tmp/tartest.tar.gz”)
names = tar.getnames()
for name in names:
tar.extract(name,path=”/tmp”)
tar.close()
试试
tar = tarfile.open(“/tmp/tartest.tar.gz”)
names = tar.getnames()
for name in names:
tar.extract(name,path=”/tmp”)
tar.close()
试试
#1
import tarfile
tar = tarfile.open(“/tmp/tartest.tar.gz”)
names = tar.getnames()
for name in names:
tar.extract(name,path=”/tmp”)
tar.close()
试试
tar = tarfile.open(“/tmp/tartest.tar.gz”)
names = tar.getnames()
for name in names:
tar.extract(name,path=”/tmp”)
tar.close()
试试