PyDocs

Nav

Data Compression and Archiving

TarFile.extractfile

tarfile

method of TarFile (source)
  • TarFile.extractfile(member)
Extract a member from the archive as a file object. 'member' may be
a filename or a TarInfo object. If 'member' is a regular file or
a link, an io.BufferedReader object is returned. For all other
existing members, None is returned. If 'member' does not appear
in the archive, KeyError is raised.
Changed in 3.3, 3.13
  • 3.3: Return an io.BufferedReader object.
  • 3.13: The returned io.BufferedReader object has the mode attribute which is always equal to 'rb'.
0 Examples
No examples for tarfile/TarFile.extractfile.
See Also
No see-alsos for tarfile/TarFile.extractfile
0 Notes
No notes for TarFile.extractfile