I've got a huge *.tar.gz file and I want to see the list of files contained in it without extracting the contents (preferably with mtimes per file). How can I achieve that in python?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
You can use TarFile.getnames() like this:
http://docs.python.org/3.3/library/tarfile.html#tarfile.TarFile.getnames
And if you want mtime values you can use getmembers().