def extractfile(self, member):
self._check("<STR_LIT:r>")<EOL>if isinstance(member, str):<EOL><INDENT>tarinfo = self.getmember(member)<EOL><DEDENT>else:<EOL><INDENT>tarinfo = member<EOL><DEDENT>if tarinfo.isreg():<EOL><INDENT>return self.fileobject(self, tarinfo)<EOL><DEDENT>elif tarinfo.type not in SUPPORTED_TYPES:<EOL><INDENT>return self.fileobject(self, tarinfo)<EOL><DEDENT>elif tarinfo.islnk() or tarinfo.issym():<EOL><INDENT>if isinstance(self.fileobj, _Stream):<EOL><INDENT>raise StreamError("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>return self.extractfile(self._find_link_target(tarinfo))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>
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, a
           file-like object is returned. If `member' is a link, a file-like
           object is constructed from the link's target. If `member' is none of
           the above, None is returned.
           The file-like object is read-only and provides the following
           methods: read(), readline(), readlines(), seek() and tell()