chunk_id
stringlengths
36
36
source
stringclasses
35 values
source_url
stringlengths
0
290
upstream_license
stringclasses
1 value
document_id
stringlengths
36
36
chunk_index
int64
0
324k
retrieved_at
stringclasses
2 values
chunker_version
stringclasses
4 values
content_hash
stringlengths
15
64
content
stringlengths
50
44.7k
namespace
stringclasses
9 values
source_name
stringclasses
35 values
raw_text
stringlengths
50
44.7k
cleaned_text
stringlengths
50
44.7k
tags
stringclasses
49 values
collection_name
stringclasses
11 values
ffc0d240-0ee8-4ca1-b1e8-2ae714259415
CPython Docs
file://datasets/cpython/Doc/library/decimal.rst
unknown
7faf20f8-9cc8-43f8-9c7b-724dffea11bf
46,885
supabase-export-v2
2467039fec93207d
the number of significant places in the coefficient. For example, expressing ``5.0E+3`` as ``5000`` keeps the value constant but cannot show the original's two-place significance. If an application does not care about tracking significance, it is easy to remove the exponent and trailing zeroes, losing significance, but...
trusted_official_docs
CPython Docs
the number of significant places in the coefficient. For example, expressing ``5.0E+3`` as ``5000`` keeps the value constant but cannot show the original's two-place significance. If an application does not care about tracking significance, it is easy to remove the exponent and trailing zeroes, losing significance, but...
the number of significant places in the coefficient. For example, expressing ``5.0E+3`` as ``5000`` keeps the value constant but cannot show the original's two-place significance. If an application does not care about tracking significance, it is easy to remove the exponent and trailing zeroes, losing significance, but...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ffcb06db-4660-420c-ae62-c0173414132d
CPython Docs
file://datasets/cpython/Doc/library/decimal.rst
unknown
7faf20f8-9cc8-43f8-9c7b-724dffea11bf
46,498
supabase-export-v2
c308555dce60e03f
and the exponent is incremented by 1. Otherwise (the coefficient is zero) the exponent is set to 0. In all cases the sign is unchanged. For example, ``Decimal('32.100')`` and ``Decimal('0.321000e+2')`` both normalize to the equivalent value ``Decimal('32.1')``.
trusted_official_docs
CPython Docs
and the exponent is incremented by 1. Otherwise (the coefficient is zero) the exponent is set to 0. In all cases the sign is unchanged. For example, ``Decimal('32.100')`` and ``Decimal('0.321000e+2')`` both normalize to the equivalent value ``Decimal('32.1')``.
and the exponent is incremented by 1. Otherwise (the coefficient is zero) the exponent is set to 0. In all cases the sign is unchanged. For example, ``Decimal('32.100')`` and ``Decimal('0.321000e+2')`` both normalize to the equivalent value ``Decimal('32.1')``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
004a2c43-976a-403f-8050-8d81721a3715
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,940
supabase-export-v2
bf80199ace8cfdc9
Open for gzip compressed writing. | +------------------+---------------------------------------------+ | ``'w:bz2'`` | Open for bzip2 compressed writing. | +------------------+---------------------------------------------+ | ``'w:xz'`` | Open for lzma compressed writing. | +------------------+-------------------------...
trusted_official_docs
CPython Docs
Open for gzip compressed writing. | +------------------+---------------------------------------------+ | ``'w:bz2'`` | Open for bzip2 compressed writing. | +------------------+---------------------------------------------+ | ``'w:xz'`` | Open for lzma compressed writing. | +------------------+-------------------------...
Open for gzip compressed writing. | +------------------+---------------------------------------------+ | ``'w:bz2'`` | Open for bzip2 compressed writing. | +------------------+---------------------------------------------+ | ``'w:xz'`` | Open for lzma compressed writing. | +------------------+-------------------------...
python, official-docs, cpython, P0
Local_Trusted_Corpus
05cbf22f-e064-4f70-aa2f-066b978aeeaf
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,094
supabase-export-v2
972449dc32a39127
``1`` (the default), all *fatal* errors are raised as :exc:`OSError` or :exc:`FilterError` exceptions. If ``2``, all *non-fatal* errors are raised as :exc:`TarError` exceptions as well. Some exceptions, e.g. ones caused by wrong argument types or data corruption, are always raised.
trusted_official_docs
CPython Docs
``1`` (the default), all *fatal* errors are raised as :exc:`OSError` or :exc:`FilterError` exceptions. If ``2``, all *non-fatal* errors are raised as :exc:`TarError` exceptions as well. Some exceptions, e.g. ones caused by wrong argument types or data corruption, are always raised.
``1`` (the default), all *fatal* errors are raised as :exc:`OSError` or :exc:`FilterError` exceptions. If ``2``, all *non-fatal* errors are raised as :exc:`TarError` exceptions as well. Some exceptions, e.g. ones caused by wrong argument types or data corruption, are always raised.
python, official-docs, cpython, P0
Local_Trusted_Corpus
0733e415-711f-4ca2-a02e-875aec53c7ce
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,329
supabase-export-v2
ed9a8fe104a04e86
How to create and write an archive to stdout using :data:`sys.stdout.buffer <sys.stdout>` in the *fileobj* parameter in :meth:`TarFile.add`:: import sys import tarfile with tarfile.open("sample.tar.gz", "w|gz", fileobj=sys.stdout.buffer) as tar: for name in ["foo", "bar", "quux"]: tar.add(name)
trusted_official_docs
CPython Docs
How to create and write an archive to stdout using :data:`sys.stdout.buffer <sys.stdout>` in the *fileobj* parameter in :meth:`TarFile.add`:: import sys import tarfile with tarfile.open("sample.tar.gz", "w|gz", fileobj=sys.stdout.buffer) as tar: for name in ["foo", "bar", "quux"]: tar.add(name)
How to create and write an archive to stdout using :data:`sys.stdout.buffer <sys.stdout>` in the *fileobj* parameter in :meth:`TarFile.add`:: import sys import tarfile with tarfile.open("sample.tar.gz", "w|gz", fileobj=sys.stdout.buffer) as tar: for name in ["foo", "bar", "quux"]: tar.add(name)
python, official-docs, cpython, P0
Local_Trusted_Corpus
0809330f-7215-437b-9c8d-95538fadf0ce
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,274
supabase-export-v2
15a97279ff53dd71
* Use the ``'data'`` filter; *warn* if it is not available:: if hasattr(tarfile, 'data_filter'): my_tarfile.extractall(filter='data') else: # remove this when no longer needed warn_the_user('Extracting may be unsafe; consider updating Python') my_tarfile.extractall()
trusted_official_docs
CPython Docs
* Use the ``'data'`` filter; *warn* if it is not available:: if hasattr(tarfile, 'data_filter'): my_tarfile.extractall(filter='data') else: # remove this when no longer needed warn_the_user('Extracting may be unsafe; consider updating Python') my_tarfile.extractall()
* Use the ``'data'`` filter; *warn* if it is not available:: if hasattr(tarfile, 'data_filter'): my_tarfile.extractall(filter='data') else: # remove this when no longer needed warn_the_user('Extracting may be unsafe; consider updating Python') my_tarfile.extractall()
python, official-docs, cpython, P0
Local_Trusted_Corpus
093a051d-7e9b-40b9-8d51-b746cf7b2f1f
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,341
supabase-export-v2
bb33029130ae207d
not be longer than 100 characters, there is no user/group name information. Some archives have miscalculated header checksums in case of fields with non-ASCII characters. * The SunOS tar extended format. This format is a variant of the POSIX.1-2001 pax format, but is not compatible.
trusted_official_docs
CPython Docs
not be longer than 100 characters, there is no user/group name information. Some archives have miscalculated header checksums in case of fields with non-ASCII characters. * The SunOS tar extended format. This format is a variant of the POSIX.1-2001 pax format, but is not compatible.
not be longer than 100 characters, there is no user/group name information. Some archives have miscalculated header checksums in case of fields with non-ASCII characters. * The SunOS tar extended format. This format is a variant of the POSIX.1-2001 pax format, but is not compatible.
python, official-docs, cpython, P0
Local_Trusted_Corpus
0ac05265-8696-4865-a768-745162da3938
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,226
supabase-export-v2
c65be2f197f49a3d
a :ref:`TarInfo <tarinfo-objects>` describing the member and the destination path to where the archive is extracted (i.e. the same path is used for all members):: filter(member: TarInfo, path: str, /) -> TarInfo | None
trusted_official_docs
CPython Docs
a :ref:`TarInfo <tarinfo-objects>` describing the member and the destination path to where the archive is extracted (i.e. the same path is used for all members):: filter(member: TarInfo, path: str, /) -> TarInfo | None
a :ref:`TarInfo <tarinfo-objects>` describing the member and the destination path to where the archive is extracted (i.e. the same path is used for all members):: filter(member: TarInfo, path: str, /) -> TarInfo | None
python, official-docs, cpython, P0
Local_Trusted_Corpus
11826560-ea9f-419d-b0cd-ddc6e3083260
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,330
supabase-export-v2
b0c0e1fbe6e04e5d
import sys import tarfile with tarfile.open("sample.tar.gz", "w|gz", fileobj=sys.stdout.buffer) as tar: for name in ["foo", "bar", "quux"]: tar.add(name) How to create an archive and reset the user information using the *filter* parameter in :meth:`TarFile.add`::
trusted_official_docs
CPython Docs
import sys import tarfile with tarfile.open("sample.tar.gz", "w|gz", fileobj=sys.stdout.buffer) as tar: for name in ["foo", "bar", "quux"]: tar.add(name) How to create an archive and reset the user information using the *filter* parameter in :meth:`TarFile.add`::
import sys import tarfile with tarfile.open("sample.tar.gz", "w|gz", fileobj=sys.stdout.buffer) as tar: for name in ["foo", "bar", "quux"]: tar.add(name) How to create an archive and reset the user information using the *filter* parameter in :meth:`TarFile.add`::
python, official-docs, cpython, P0
Local_Trusted_Corpus
121a4df3-bef0-4389-91b8-7e6e7c13cf30
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,947
supabase-export-v2
96483e006984712d
argument *mtime* to create a gzip archive header with that mtime. By default, the mtime is set to the time of creation of the archive. For special purposes, there is a second format for *mode*: ``'filemode|[compression]'``. :func:`tarfile.open` will return a :class:`TarFile` object that processes its data as a stream...
trusted_official_docs
CPython Docs
argument *mtime* to create a gzip archive header with that mtime. By default, the mtime is set to the time of creation of the archive. For special purposes, there is a second format for *mode*: ``'filemode|[compression]'``. :func:`tarfile.open` will return a :class:`TarFile` object that processes its data as a stream...
argument *mtime* to create a gzip archive header with that mtime. By default, the mtime is set to the time of creation of the archive. For special purposes, there is a second format for *mode*: ``'filemode|[compression]'``. :func:`tarfile.open` will return a :class:`TarFile` object that processes its data as a stream...
python, official-docs, cpython, P0
Local_Trusted_Corpus
132f7574-69f5-4173-946f-ec4a5272942d
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,212
supabase-export-v2
eb37362a29755850
extracting a tar file can overwrite arbitrary files in various ways (e.g. by using absolute paths, ``..`` path components, or symlinks that affect later members). In most cases, the full functionality is not needed. Therefore, *tarfile* supports extraction filters: a mechanism to limit functionality, and thus mitigate ...
trusted_official_docs
CPython Docs
extracting a tar file can overwrite arbitrary files in various ways (e.g. by using absolute paths, ``..`` path components, or symlinks that affect later members). In most cases, the full functionality is not needed. Therefore, *tarfile* supports extraction filters: a mechanism to limit functionality, and thus mitigate ...
extracting a tar file can overwrite arbitrary files in various ways (e.g. by using absolute paths, ``..`` path components, or symlinks that affect later members). In most cases, the full functionality is not needed. Therefore, *tarfile* supports extraction filters: a mechanism to limit functionality, and thus mitigate ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
171de837-883e-4228-b814-8b01be953c5e
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,126
supabase-export-v2
dac6d08b66da53fc
archive. For cases where this is unwanted, you can use :mod:`copy.copy() <copy>` or call the :meth:`~TarInfo.replace` method to create a modified copy in one step. Several attributes can be set to ``None`` to indicate that a piece of metadata is unused or unknown. Different :class:`TarInfo` methods handle ``None`` diff...
trusted_official_docs
CPython Docs
archive. For cases where this is unwanted, you can use :mod:`copy.copy() <copy>` or call the :meth:`~TarInfo.replace` method to create a modified copy in one step. Several attributes can be set to ``None`` to indicate that a piece of metadata is unused or unknown. Different :class:`TarInfo` methods handle ``None`` diff...
archive. For cases where this is unwanted, you can use :mod:`copy.copy() <copy>` or call the :meth:`~TarInfo.replace` method to create a modified copy in one step. Several attributes can be set to ``None`` to indicate that a piece of metadata is unused or unknown. Different :class:`TarInfo` methods handle ``None`` diff...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1a98e61d-e69c-46f5-9961-1c6e2687d426
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,331
supabase-export-v2
2a14383ba427f076
How to create an archive and reset the user information using the *filter* parameter in :meth:`TarFile.add`:: import tarfile def reset(tarinfo): tarinfo.uid = tarinfo.gid = 0 tarinfo.uname = tarinfo.gname = "root" return tarinfo tar = tarfile.open("sample.tar.gz", "w:gz") tar.add("foo", filter=reset) tar.close()
trusted_official_docs
CPython Docs
How to create an archive and reset the user information using the *filter* parameter in :meth:`TarFile.add`:: import tarfile def reset(tarinfo): tarinfo.uid = tarinfo.gid = 0 tarinfo.uname = tarinfo.gname = "root" return tarinfo tar = tarfile.open("sample.tar.gz", "w:gz") tar.add("foo", filter=reset) tar.close()
How to create an archive and reset the user information using the *filter* parameter in :meth:`TarFile.add`:: import tarfile def reset(tarinfo): tarinfo.uid = tarinfo.gid = 0 tarinfo.uname = tarinfo.gname = "root" return tarinfo tar = tarfile.open("sample.tar.gz", "w:gz") tar.add("foo", filter=reset) tar.close()
python, official-docs, cpython, P0
Local_Trusted_Corpus
1bcd7cec-dfd9-4352-ada9-e6cb60e08010
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,347
supabase-export-v2
d554e5af2f759518
be converted. Possible values are listed in section :ref:`error-handlers`. The default scheme is ``'surrogateescape'`` which Python also uses for its file system calls, see :ref:`os-filenames`. For :const:`PAX_FORMAT` archives (the default), *encoding* is generally not needed because all the metadata is stored using *U...
trusted_official_docs
CPython Docs
be converted. Possible values are listed in section :ref:`error-handlers`. The default scheme is ``'surrogateescape'`` which Python also uses for its file system calls, see :ref:`os-filenames`. For :const:`PAX_FORMAT` archives (the default), *encoding* is generally not needed because all the metadata is stored using *U...
be converted. Possible values are listed in section :ref:`error-handlers`. The default scheme is ``'surrogateescape'`` which Python also uses for its file system calls, see :ref:`os-filenames`. For :const:`PAX_FORMAT` archives (the default), *encoding* is generally not needed because all the metadata is stored using *U...
python, official-docs, cpython, P0
Local_Trusted_Corpus
20add07f-40a8-4136-b2f9-e16665ad6d62
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,041
supabase-export-v2
4b5c0edc960901d4
it is :const:`True`, add the content of the target files to the archive. This has no effect on systems that do not support symbolic links. If *ignore_zeros* is :const:`False`, treat an empty block as the end of the archive. If it is :const:`True`, skip empty (and invalid) blocks and try to get as many members as possi...
trusted_official_docs
CPython Docs
it is :const:`True`, add the content of the target files to the archive. This has no effect on systems that do not support symbolic links. If *ignore_zeros* is :const:`False`, treat an empty block as the end of the archive. If it is :const:`True`, skip empty (and invalid) blocks and try to get as many members as possi...
it is :const:`True`, add the content of the target files to the archive. This has no effect on systems that do not support symbolic links. If *ignore_zeros* is :const:`False`, treat an empty block as the end of the archive. If it is :const:`True`, skip empty (and invalid) blocks and try to get as many members as possi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
28f07d6d-15a8-4037-ad3a-710ea8298bd0
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,960
supabase-export-v2
1414ed578d40ed51
Return :const:`True` if *name* is a tar archive file, that the :mod:`!tarfile` module can read. *name* may be a :class:`str`, file, or file-like object. .. versionchanged:: 3.9 Support for file and file-like objects.
trusted_official_docs
CPython Docs
Return :const:`True` if *name* is a tar archive file, that the :mod:`!tarfile` module can read. *name* may be a :class:`str`, file, or file-like object. .. versionchanged:: 3.9 Support for file and file-like objects.
Return :const:`True` if *name* is a tar archive file, that the :mod:`!tarfile` module can read. *name* may be a :class:`str`, file, or file-like object. .. versionchanged:: 3.9 Support for file and file-like objects.
python, official-docs, cpython, P0
Local_Trusted_Corpus
299cb2c9-cdaa-41f3-93cd-59fe6aeb553f
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,322
supabase-export-v2
65b923ac0f996f31
How to read a gzip compressed tar archive and display some member information:: import tarfile tar = tarfile.open("sample.tar.gz", "r:gz") for tarinfo in tar: print(tarinfo.name, "is", tarinfo.size, "bytes in size and is ", end="") if tarinfo.isreg(): print("a regular file.") elif tarinfo.isdir(): print("a direc...
trusted_official_docs
CPython Docs
How to read a gzip compressed tar archive and display some member information:: import tarfile tar = tarfile.open("sample.tar.gz", "r:gz") for tarinfo in tar: print(tarinfo.name, "is", tarinfo.size, "bytes in size and is ", end="") if tarinfo.isreg(): print("a regular file.") elif tarinfo.isdir(): print("a direc...
How to read a gzip compressed tar archive and display some member information:: import tarfile tar = tarfile.open("sample.tar.gz", "r:gz") for tarinfo in tar: print(tarinfo.name, "is", tarinfo.size, "bytes in size and is ", end="") if tarinfo.isreg(): print("a regular file.") elif tarinfo.isdir(): print("a direc...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2aeb2a4b-f5b1-44d0-bdad-47bbca2fb83c
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,345
supabase-export-v2
acffa03d8118f60c
The details of character conversion in :mod:`!tarfile` are controlled by the *encoding* and *errors* keyword arguments of the :class:`TarFile` class. *encoding* defines the character encoding to use for the metadata in the archive. The default value is :func:`sys.getfilesystemencoding` or ``'ascii'`` as a fallback. Dep...
trusted_official_docs
CPython Docs
The details of character conversion in :mod:`!tarfile` are controlled by the *encoding* and *errors* keyword arguments of the :class:`TarFile` class. *encoding* defines the character encoding to use for the metadata in the archive. The default value is :func:`sys.getfilesystemencoding` or ``'ascii'`` as a fallback. Dep...
The details of character conversion in :mod:`!tarfile` are controlled by the *encoding* and *errors* keyword arguments of the :class:`TarFile` class. *encoding* defines the character encoding to use for the metadata in the archive. The default value is :func:`sys.getfilesystemencoding` or ``'ascii'`` as a fallback. Dep...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2bb32164-bdeb-48ed-b35d-38b79fb4e53e
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,336
supabase-export-v2
b879c83280f3f0d4
256 characters and linknames up to 100 characters. The maximum file size is 8 GiB. This is an old and limited but widely supported format. * The GNU tar format (:const:`GNU_FORMAT`). It supports long filenames and linknames, files bigger than 8 GiB and sparse files. It is the de facto standard on GNU/Linux systems. :...
trusted_official_docs
CPython Docs
256 characters and linknames up to 100 characters. The maximum file size is 8 GiB. This is an old and limited but widely supported format. * The GNU tar format (:const:`GNU_FORMAT`). It supports long filenames and linknames, files bigger than 8 GiB and sparse files. It is the de facto standard on GNU/Linux systems. :...
256 characters and linknames up to 100 characters. The maximum file size is 8 GiB. This is an old and limited but widely supported format. * The GNU tar format (:const:`GNU_FORMAT`). It supports long filenames and linknames, files bigger than 8 GiB and sparse files. It is the de facto standard on GNU/Linux systems. :...
python, official-docs, cpython, P0
Local_Trusted_Corpus
30a3af65-4de3-494f-8d33-a69dd23b908a
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,124
supabase-export-v2
fa1a8a071a641a65
(like file type, size, time, permissions, owner etc.), it provides some useful methods to determine its type. It does *not* contain the file's data itself. :class:`TarInfo` objects are returned by :class:`TarFile`'s methods :meth:`~TarFile.getmember`, :meth:`~TarFile.getmembers` and :meth:`~TarFile.gettarinfo`.
trusted_official_docs
CPython Docs
(like file type, size, time, permissions, owner etc.), it provides some useful methods to determine its type. It does *not* contain the file's data itself. :class:`TarInfo` objects are returned by :class:`TarFile`'s methods :meth:`~TarFile.getmember`, :meth:`~TarFile.getmembers` and :meth:`~TarFile.gettarinfo`.
(like file type, size, time, permissions, owner etc.), it provides some useful methods to determine its type. It does *not* contain the file's data itself. :class:`TarInfo` objects are returned by :class:`TarFile`'s methods :meth:`~TarFile.getmember`, :meth:`~TarFile.getmembers` and :meth:`~TarFile.gettarinfo`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
3336b17d-0a64-4a3f-be7f-f5ca7180e916
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,046
supabase-export-v2
34eaede8d12780b2
The *pax_headers* argument is an optional dictionary of strings which will be added as a pax global header if *format* is :const:`PAX_FORMAT`. If *stream* is set to :const:`True` then while reading the archive info about files in the archive are not cached, saving memory.
trusted_official_docs
CPython Docs
The *pax_headers* argument is an optional dictionary of strings which will be added as a pax global header if *format* is :const:`PAX_FORMAT`. If *stream* is set to :const:`True` then while reading the archive info about files in the archive are not cached, saving memory.
The *pax_headers* argument is an optional dictionary of strings which will be added as a pax global header if *format* is :const:`PAX_FORMAT`. If *stream* is set to :const:`True` then while reading the archive info about files in the archive are not cached, saving memory.
python, official-docs, cpython, P0
Local_Trusted_Corpus
3387cbf7-266f-4816-acb7-9d8ca9395399
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,039
supabase-export-v2
c77b3fd95de00c2b
or :const:`PAX_FORMAT` that are defined at module level. When reading, format will be automatically detected, even if different formats are present in a single archive. The *tarinfo* argument can be used to replace the default :class:`TarInfo` class with a different one.
trusted_official_docs
CPython Docs
or :const:`PAX_FORMAT` that are defined at module level. When reading, format will be automatically detected, even if different formats are present in a single archive. The *tarinfo* argument can be used to replace the default :class:`TarInfo` class with a different one.
or :const:`PAX_FORMAT` that are defined at module level. When reading, format will be automatically detected, even if different formats are present in a single archive. The *tarinfo* argument can be used to replace the default :class:`TarInfo` class with a different one.
python, official-docs, cpython, P0
Local_Trusted_Corpus
35c6dcb2-9e03-43b1-89b7-9a8b484cd339
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,951
supabase-export-v2
b923a80a4198215c
lzma compressed *stream* for | | | writing. | +-------------+--------------------------------------------+ | ``'w|zst'`` | Open a Zstandard compressed *stream* for | | | writing. | +-------------+--------------------------------------------+ .. versionchanged:: 3.5 The ``'x'`` (exclusive creation) mode was added.
trusted_official_docs
CPython Docs
lzma compressed *stream* for | | | writing. | +-------------+--------------------------------------------+ | ``'w|zst'`` | Open a Zstandard compressed *stream* for | | | writing. | +-------------+--------------------------------------------+ .. versionchanged:: 3.5 The ``'x'`` (exclusive creation) mode was added.
lzma compressed *stream* for | | | writing. | +-------------+--------------------------------------------+ | ``'w|zst'`` | Open a Zstandard compressed *stream* for | | | writing. | +-------------+--------------------------------------------+ .. versionchanged:: 3.5 The ``'x'`` (exclusive creation) mode was added.
python, official-docs, cpython, P0
Local_Trusted_Corpus
3b485a03-a94f-418b-86c4-9f6b2908a0ac
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,929
supabase-export-v2
f8dd7ede7ff90f26
.. versionchanged:: 3.3 Added support for :mod:`lzma` compression. .. versionchanged:: 3.12 Archives are extracted using a :ref:`filter <tarfile-extraction-filter>`, which makes it possible to either limit surprising/dangerous features, or to acknowledge that they are expected and the archive is fully trusted.
trusted_official_docs
CPython Docs
.. versionchanged:: 3.3 Added support for :mod:`lzma` compression. .. versionchanged:: 3.12 Archives are extracted using a :ref:`filter <tarfile-extraction-filter>`, which makes it possible to either limit surprising/dangerous features, or to acknowledge that they are expected and the archive is fully trusted.
.. versionchanged:: 3.3 Added support for :mod:`lzma` compression. .. versionchanged:: 3.12 Archives are extracted using a :ref:`filter <tarfile-extraction-filter>`, which makes it possible to either limit surprising/dangerous features, or to acknowledge that they are expected and the archive is fully trusted.
python, official-docs, cpython, P0
Local_Trusted_Corpus
3dd8b389-ba9b-419d-b773-8ff67df167bb
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,241
supabase-export-v2
0615b2c1d967fa33
using :func:`os.path.normpath`. Note that this removes internal ``..`` components, which may change the meaning of the link if the path in :attr:`!TarInfo.linkname` traverses symbolic links. - :ref:`Refuse <tarfile-extraction-refuse>` to extract links (hard or soft) that link to absolute paths, or ones that link outsi...
trusted_official_docs
CPython Docs
using :func:`os.path.normpath`. Note that this removes internal ``..`` components, which may change the meaning of the link if the path in :attr:`!TarInfo.linkname` traverses symbolic links. - :ref:`Refuse <tarfile-extraction-refuse>` to extract links (hard or soft) that link to absolute paths, or ones that link outsi...
using :func:`os.path.normpath`. Note that this removes internal ``..`` components, which may change the meaning of the link if the path in :attr:`!TarInfo.linkname` traverses symbolic links. - :ref:`Refuse <tarfile-extraction-refuse>` to extract links (hard or soft) that link to absolute paths, or ones that link outsi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
42a7c2ee-e7c5-4f96-80df-c5b5aea2ca16
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,110
supabase-export-v2
39d37bb9f9c610af
.. method:: TarFile.addfile(tarinfo, fileobj=None) Add the :class:`TarInfo` object *tarinfo* to the archive. If *tarinfo* represents a non zero-size regular file, the *fileobj* argument should be a :term:`binary file`, and ``tarinfo.size`` bytes are read from it and added to the archive. You can create :class:`TarIn...
trusted_official_docs
CPython Docs
.. method:: TarFile.addfile(tarinfo, fileobj=None) Add the :class:`TarInfo` object *tarinfo* to the archive. If *tarinfo* represents a non zero-size regular file, the *fileobj* argument should be a :term:`binary file`, and ``tarinfo.size`` bytes are read from it and added to the archive. You can create :class:`TarIn...
.. method:: TarFile.addfile(tarinfo, fileobj=None) Add the :class:`TarInfo` object *tarinfo* to the archive. If *tarinfo* represents a non zero-size regular file, the *fileobj* argument should be a :term:`binary file`, and ``tarinfo.size`` bytes are read from it and added to the archive. You can create :class:`TarIn...
python, official-docs, cpython, P0
Local_Trusted_Corpus
42c089e1-6143-41d8-b331-cb511d18a949
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,258
supabase-export-v2
294e07be4a9bdf84
not suited for extracting untrusted files without prior inspection. Among other issues, the pre-defined filters do not prevent denial-of-service attacks. Users should do additional checks. Here is an incomplete list of things to consider:
trusted_official_docs
CPython Docs
not suited for extracting untrusted files without prior inspection. Among other issues, the pre-defined filters do not prevent denial-of-service attacks. Users should do additional checks. Here is an incomplete list of things to consider:
not suited for extracting untrusted files without prior inspection. Among other issues, the pre-defined filters do not prevent denial-of-service attacks. Users should do additional checks. Here is an incomplete list of things to consider:
python, official-docs, cpython, P0
Local_Trusted_Corpus
442bdd6c-3c68-4a52-8dcd-442f64bdb105
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,137
supabase-export-v2
e6bab243b622085c
Create a string buffer from a :class:`TarInfo` object. For information on the arguments see the constructor of the :class:`TarFile` class. .. versionchanged:: 3.2 Use ``'surrogateescape'`` as the default for the *errors* argument.
trusted_official_docs
CPython Docs
Create a string buffer from a :class:`TarInfo` object. For information on the arguments see the constructor of the :class:`TarFile` class. .. versionchanged:: 3.2 Use ``'surrogateescape'`` as the default for the *errors* argument.
Create a string buffer from a :class:`TarInfo` object. For information on the arguments see the constructor of the :class:`TarFile` class. .. versionchanged:: 3.2 Use ``'surrogateescape'`` as the default for the *errors* argument.
python, official-docs, cpython, P0
Local_Trusted_Corpus
44c67903-c2b1-4820-ad09-3f3430c86301
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,152
supabase-export-v2
8f9aeb065135f729
.. attribute:: TarInfo.type File type. *type* is usually one of these constants: :const:`REGTYPE`, :const:`AREGTYPE`, :const:`LNKTYPE`, :const:`SYMTYPE`, :const:`DIRTYPE`, :const:`FIFOTYPE`, :const:`CONTTYPE`, :const:`CHRTYPE`, :const:`BLKTYPE`, :const:`GNUTYPE_SPARSE`. To determine the type of a :class:`TarInfo` ob...
trusted_official_docs
CPython Docs
.. attribute:: TarInfo.type File type. *type* is usually one of these constants: :const:`REGTYPE`, :const:`AREGTYPE`, :const:`LNKTYPE`, :const:`SYMTYPE`, :const:`DIRTYPE`, :const:`FIFOTYPE`, :const:`CONTTYPE`, :const:`CHRTYPE`, :const:`BLKTYPE`, :const:`GNUTYPE_SPARSE`. To determine the type of a :class:`TarInfo` ob...
.. attribute:: TarInfo.type File type. *type* is usually one of these constants: :const:`REGTYPE`, :const:`AREGTYPE`, :const:`LNKTYPE`, :const:`SYMTYPE`, :const:`DIRTYPE`, :const:`FIFOTYPE`, :const:`CONTTYPE`, :const:`CHRTYPE`, :const:`BLKTYPE`, :const:`GNUTYPE_SPARSE`. To determine the type of a :class:`TarInfo` ob...
python, official-docs, cpython, P0
Local_Trusted_Corpus
458ced68-6d9a-40da-b8e4-acd3274fda9c
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,211
supabase-export-v2
3aa2e57202d6b7a1
.. versionadded:: 3.12 The *tar* format is designed to capture all details of a UNIX-like filesystem, which makes it very powerful. Unfortunately, the features make it easy to create tar files that have unintended -- and possibly malicious -- effects when extracted. For example, extracting a tar file can overwrite arbi...
trusted_official_docs
CPython Docs
.. versionadded:: 3.12 The *tar* format is designed to capture all details of a UNIX-like filesystem, which makes it very powerful. Unfortunately, the features make it easy to create tar files that have unintended -- and possibly malicious -- effects when extracted. For example, extracting a tar file can overwrite arbi...
.. versionadded:: 3.12 The *tar* format is designed to capture all details of a UNIX-like filesystem, which makes it very powerful. Unfortunately, the features make it easy to create tar files that have unintended -- and possibly malicious -- effects when extracted. For example, extracting a tar file can overwrite arbi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
466defed-7e42-49f0-ac08-d415177037db
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,240
supabase-export-v2
45a7abff2f45b770
Implements the ``'data'`` filter. In addition to what ``tar_filter`` does: - Normalize link targets (:attr:`TarInfo.linkname`) using :func:`os.path.normpath`. Note that this removes internal ``..`` components, which may change the meaning of the link if the path in :attr:`!TarInfo.linkname` traverses symbolic links.
trusted_official_docs
CPython Docs
Implements the ``'data'`` filter. In addition to what ``tar_filter`` does: - Normalize link targets (:attr:`TarInfo.linkname`) using :func:`os.path.normpath`. Note that this removes internal ``..`` components, which may change the meaning of the link if the path in :attr:`!TarInfo.linkname` traverses symbolic links.
Implements the ``'data'`` filter. In addition to what ``tar_filter`` does: - Normalize link targets (:attr:`TarInfo.linkname`) using :func:`os.path.normpath`. Note that this removes internal ``..`` components, which may change the meaning of the link if the path in :attr:`!TarInfo.linkname` traverses symbolic links.
python, official-docs, cpython, P0
Local_Trusted_Corpus
4863bb3b-7750-409c-aeae-68f6db0f1f48
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,067
supabase-export-v2
92db777f0c685e8f
.. method:: TarFile.extractall(path=".", members=None, *, numeric_owner=False, filter=None) Extract all members from the archive to the current working directory or directory *path*. If optional *members* is given, it must be a subset of the list returned by :meth:`getmembers`. Directory information like owner, modi...
trusted_official_docs
CPython Docs
.. method:: TarFile.extractall(path=".", members=None, *, numeric_owner=False, filter=None) Extract all members from the archive to the current working directory or directory *path*. If optional *members* is given, it must be a subset of the list returned by :meth:`getmembers`. Directory information like owner, modi...
.. method:: TarFile.extractall(path=".", members=None, *, numeric_owner=False, filter=None) Extract all members from the archive to the current working directory or directory *path*. If optional *members* is given, it must be a subset of the list returned by :meth:`getmembers`. Directory information like owner, modi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4a112494-e6da-4ca0-a842-b37e2f4b0388
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,218
supabase-export-v2
db48a7e941e5ebc5
The *filter* argument to :meth:`TarFile.extract` or :meth:`~TarFile.extractall` can be: * the string ``'fully_trusted'``: Honor all metadata as specified in the archive. Should be used if the user trusts the archive completely, or implements their own complex verification.
trusted_official_docs
CPython Docs
The *filter* argument to :meth:`TarFile.extract` or :meth:`~TarFile.extractall` can be: * the string ``'fully_trusted'``: Honor all metadata as specified in the archive. Should be used if the user trusts the archive completely, or implements their own complex verification.
The *filter* argument to :meth:`TarFile.extract` or :meth:`~TarFile.extractall` can be: * the string ``'fully_trusted'``: Honor all metadata as specified in the archive. Should be used if the user trusts the archive completely, or implements their own complex verification.
python, official-docs, cpython, P0
Local_Trusted_Corpus
4a9a40aa-e1f0-4be1-8226-25ef0f3c322a
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,943
supabase-export-v2
c3865bc9408b66d2
specified, it is used as an alternative to a :term:`file object` opened in binary mode for *name*. It is supposed to be at position 0. For modes ``'w:gz'``, ``'x:gz'``, ``'w|gz'``, ``'w:bz2'``, ``'x:bz2'``, ``'w|bz2'``, :func:`tarfile.open` accepts the keyword argument *compresslevel* (default ``6``) to specify the c...
trusted_official_docs
CPython Docs
specified, it is used as an alternative to a :term:`file object` opened in binary mode for *name*. It is supposed to be at position 0. For modes ``'w:gz'``, ``'x:gz'``, ``'w|gz'``, ``'w:bz2'``, ``'x:bz2'``, ``'w|bz2'``, :func:`tarfile.open` accepts the keyword argument *compresslevel* (default ``6``) to specify the c...
specified, it is used as an alternative to a :term:`file object` opened in binary mode for *name*. It is supposed to be at position 0. For modes ``'w:gz'``, ``'x:gz'``, ``'w|gz'``, ``'w:bz2'``, ``'x:bz2'``, ``'w|bz2'``, :func:`tarfile.open` accepts the keyword argument *compresslevel* (default ``6``) to specify the c...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4bad267f-d25d-4c36-a8b5-18b95b354ce1
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,219
supabase-export-v2
34e9a1a39cba3cb1
``'fully_trusted'``: Honor all metadata as specified in the archive. Should be used if the user trusts the archive completely, or implements their own complex verification. * the string ``'tar'``: Honor most *tar*-specific features (i.e. features of UNIX-like filesystems), but block features that are very likely to be...
trusted_official_docs
CPython Docs
``'fully_trusted'``: Honor all metadata as specified in the archive. Should be used if the user trusts the archive completely, or implements their own complex verification. * the string ``'tar'``: Honor most *tar*-specific features (i.e. features of UNIX-like filesystems), but block features that are very likely to be...
``'fully_trusted'``: Honor all metadata as specified in the archive. Should be used if the user trusts the archive completely, or implements their own complex verification. * the string ``'tar'``: Honor most *tar*-specific features (i.e. features of UNIX-like filesystems), but block features that are very likely to be...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4d5afddf-224a-4302-ae53-751dbc91a500
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,257
supabase-export-v2
e4cde94212200411
Hints for further verification ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Even with ``filter='data'``, *tarfile* is not suited for extracting untrusted files without prior inspection. Among other issues, the pre-defined filters do not prevent denial-of-service attacks. Users should do additional checks.
trusted_official_docs
CPython Docs
Hints for further verification ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Even with ``filter='data'``, *tarfile* is not suited for extracting untrusted files without prior inspection. Among other issues, the pre-defined filters do not prevent denial-of-service attacks. Users should do additional checks.
Hints for further verification ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Even with ``filter='data'``, *tarfile* is not suited for extracting untrusted files without prior inspection. Among other issues, the pre-defined filters do not prevent denial-of-service attacks. Users should do additional checks.
python, official-docs, cpython, P0
Local_Trusted_Corpus
4dcf18cf-8391-48af-839e-30d90b23223d
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,066
supabase-export-v2
089857158eff3019
Return the next member of the archive as a :class:`TarInfo` object, when :class:`TarFile` is opened for reading. Return :const:`None` if there is no more available. .. method:: TarFile.extractall(path=".", members=None, *, numeric_owner=False, filter=None)
trusted_official_docs
CPython Docs
Return the next member of the archive as a :class:`TarInfo` object, when :class:`TarFile` is opened for reading. Return :const:`None` if there is no more available. .. method:: TarFile.extractall(path=".", members=None, *, numeric_owner=False, filter=None)
Return the next member of the archive as a :class:`TarInfo` object, when :class:`TarFile` is opened for reading. Return :const:`None` if there is no more available. .. method:: TarFile.extractall(path=".", members=None, *, numeric_owner=False, filter=None)
python, official-docs, cpython, P0
Local_Trusted_Corpus
4e1ea4f1-4687-4fa2-bc68-823af34463f8
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,123
supabase-export-v2
6ff5dc817550c2d3
TarInfo Objects --------------- A :class:`TarInfo` object represents one member in a :class:`TarFile`. Aside from storing all required attributes of a file (like file type, size, time, permissions, owner etc.), it provides some useful methods to determine its type. It does *not* contain the file's data itself.
trusted_official_docs
CPython Docs
TarInfo Objects --------------- A :class:`TarInfo` object represents one member in a :class:`TarFile`. Aside from storing all required attributes of a file (like file type, size, time, permissions, owner etc.), it provides some useful methods to determine its type. It does *not* contain the file's data itself.
TarInfo Objects --------------- A :class:`TarInfo` object represents one member in a :class:`TarFile`. Aside from storing all required attributes of a file (like file type, size, time, permissions, owner etc.), it provides some useful methods to determine its type. It does *not* contain the file's data itself.
python, official-docs, cpython, P0
Local_Trusted_Corpus
5107bacb-e45f-450a-83df-ffc494b6a9b7
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,028
supabase-export-v2
32ec30ceca6f0222
TarFile Objects --------------- The :class:`TarFile` object provides an interface to a tar archive. A tar archive is a sequence of blocks. An archive member (a stored file) is made up of a header block followed by data blocks. It is possible to store a file in a tar archive several times. Each archive member is represe...
trusted_official_docs
CPython Docs
TarFile Objects --------------- The :class:`TarFile` object provides an interface to a tar archive. A tar archive is a sequence of blocks. An archive member (a stored file) is made up of a header block followed by data blocks. It is possible to store a file in a tar archive several times. Each archive member is represe...
TarFile Objects --------------- The :class:`TarFile` object provides an interface to a tar archive. A tar archive is a sequence of blocks. An archive member (a stored file) is made up of a header block followed by data blocks. It is possible to store a file in a tar archive several times. Each archive member is represe...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5267cb5e-507d-41af-85ee-477ffb6031d5
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,068
supabase-export-v2
0173801f7a8b5787
is reset each time a file is created in it. And, if a directory's permissions do not allow writing, extracting files to it will fail. If *numeric_owner* is :const:`True`, the uid and gid numbers from the tarfile are used to set the owner/group for the extracted files. Otherwise, the named values from the tarfile are ...
trusted_official_docs
CPython Docs
is reset each time a file is created in it. And, if a directory's permissions do not allow writing, extracting files to it will fail. If *numeric_owner* is :const:`True`, the uid and gid numbers from the tarfile are used to set the owner/group for the extracted files. Otherwise, the named values from the tarfile are ...
is reset each time a file is created in it. And, if a directory's permissions do not allow writing, extracting files to it will fail. If *numeric_owner* is :const:`True`, the uid and gid numbers from the tarfile are used to set the owner/group for the extracted files. Otherwise, the named values from the tarfile are ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
52ebd9da-8d96-4f72-bfe9-093e5d2763b9
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,339
supabase-export-v2
085aa0f27790de80
are valid for the complete archive and affect all following files. All the data in a pax header is encoded in *UTF-8* for portability reasons. There are some more variants of the tar format which can be read, but not created:
trusted_official_docs
CPython Docs
are valid for the complete archive and affect all following files. All the data in a pax header is encoded in *UTF-8* for portability reasons. There are some more variants of the tar format which can be read, but not created:
are valid for the complete archive and affect all following files. All the data in a pax header is encoded in *UTF-8* for portability reasons. There are some more variants of the tar format which can be read, but not created:
python, official-docs, cpython, P0
Local_Trusted_Corpus
5409e8f4-82f7-47de-9f7b-02df0f0868b8
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,340
supabase-export-v2
c7f64fddae9b7a5d
There are some more variants of the tar format which can be read, but not created: * The ancient V7 format. This is the first tar format from Unix Seventh Edition, storing only regular files and directories. Names must not be longer than 100 characters, there is no user/group name information. Some archives have mis...
trusted_official_docs
CPython Docs
There are some more variants of the tar format which can be read, but not created: * The ancient V7 format. This is the first tar format from Unix Seventh Edition, storing only regular files and directories. Names must not be longer than 100 characters, there is no user/group name information. Some archives have mis...
There are some more variants of the tar format which can be read, but not created: * The ancient V7 format. This is the first tar format from Unix Seventh Edition, storing only regular files and directories. Names must not be longer than 100 characters, there is no user/group name information. Some archives have mis...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5504c161-8599-40bb-8d93-9a41572a989e
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,102
supabase-export-v2
1047a3b418812892
If ``extraction_filter`` is ``None`` (the default), extraction methods will use the :func:`data <data_filter>` filter by default. The attribute may be set on instances or overridden in subclasses. It also is possible to set it on the ``TarFile`` class itself to set a global default, although, since it affects all uses...
trusted_official_docs
CPython Docs
If ``extraction_filter`` is ``None`` (the default), extraction methods will use the :func:`data <data_filter>` filter by default. The attribute may be set on instances or overridden in subclasses. It also is possible to set it on the ``TarFile`` class itself to set a global default, although, since it affects all uses...
If ``extraction_filter`` is ``None`` (the default), extraction methods will use the :func:`data <data_filter>` filter by default. The attribute may be set on instances or overridden in subclasses. It also is possible to set it on the ``TarFile`` class itself to set a global default, although, since it affects all uses...
python, official-docs, cpython, P0
Local_Trusted_Corpus
557f3725-e845-4db9-b952-cf84e8e20fe4
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,930
supabase-export-v2
e929aa26ff096d7e
a :ref:`filter <tarfile-extraction-filter>`, which makes it possible to either limit surprising/dangerous features, or to acknowledge that they are expected and the archive is fully trusted. .. versionchanged:: 3.14 Set the default extraction filter to :func:`data <data_filter>`, which disallows some dangerous featur...
trusted_official_docs
CPython Docs
a :ref:`filter <tarfile-extraction-filter>`, which makes it possible to either limit surprising/dangerous features, or to acknowledge that they are expected and the archive is fully trusted. .. versionchanged:: 3.14 Set the default extraction filter to :func:`data <data_filter>`, which disallows some dangerous featur...
a :ref:`filter <tarfile-extraction-filter>`, which makes it possible to either limit surprising/dangerous features, or to acknowledge that they are expected and the archive is fully trusted. .. versionchanged:: 3.14 Set the default extraction filter to :func:`data <data_filter>`, which disallows some dangerous featur...
python, official-docs, cpython, P0
Local_Trusted_Corpus
559888be-95db-45d8-8826-c572145ea89d
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,950
supabase-export-v2
35072dd1757db70e
Open a gzip compressed *stream* for | | | writing. | +-------------+--------------------------------------------+ | ``'w|bz2'`` | Open a bzip2 compressed *stream* for | | | writing. | +-------------+--------------------------------------------+ | ``'w|xz'`` | Open an lzma compressed *stream* for | | | writing. | +-...
trusted_official_docs
CPython Docs
Open a gzip compressed *stream* for | | | writing. | +-------------+--------------------------------------------+ | ``'w|bz2'`` | Open a bzip2 compressed *stream* for | | | writing. | +-------------+--------------------------------------------+ | ``'w|xz'`` | Open an lzma compressed *stream* for | | | writing. | +-...
Open a gzip compressed *stream* for | | | writing. | +-------------+--------------------------------------------+ | ``'w|bz2'`` | Open a bzip2 compressed *stream* for | | | writing. | +-------------+--------------------------------------------+ | ``'w|xz'`` | Open an lzma compressed *stream* for | | | writing. | +-...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5645fc77-4f69-4aa9-b0c3-5ab7feb819ff
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,939
supabase-export-v2
eba7647c327cfe54
exists. | +------------------+---------------------------------------------+ | ``'x:zst'`` | Create a tarfile with Zstandard compression.| | | Raise a :exc:`FileExistsError` exception | | | if it already exists. | +------------------+---------------------------------------------+ | ``'a'`` or | Open for appending wit...
trusted_official_docs
CPython Docs
exists. | +------------------+---------------------------------------------+ | ``'x:zst'`` | Create a tarfile with Zstandard compression.| | | Raise a :exc:`FileExistsError` exception | | | if it already exists. | +------------------+---------------------------------------------+ | ``'a'`` or | Open for appending wit...
exists. | +------------------+---------------------------------------------+ | ``'x:zst'`` | Create a tarfile with Zstandard compression.| | | Raise a :exc:`FileExistsError` exception | | | if it already exists. | +------------------+---------------------------------------------+ | ``'a'`` or | Open for appending wit...
python, official-docs, cpython, P0
Local_Trusted_Corpus
59f92225-76ce-40c9-8532-0ee5ef4dd298
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,095
supabase-export-v2
eede056c380d765c
Some exceptions, e.g. ones caused by wrong argument types or data corruption, are always raised. Custom :ref:`extraction filters <tarfile-extraction-filter>` should raise :exc:`FilterError` for *fatal* errors and :exc:`ExtractError` for *non-fatal* ones.
trusted_official_docs
CPython Docs
Some exceptions, e.g. ones caused by wrong argument types or data corruption, are always raised. Custom :ref:`extraction filters <tarfile-extraction-filter>` should raise :exc:`FilterError` for *fatal* errors and :exc:`ExtractError` for *non-fatal* ones.
Some exceptions, e.g. ones caused by wrong argument types or data corruption, are always raised. Custom :ref:`extraction filters <tarfile-extraction-filter>` should raise :exc:`FilterError` for *fatal* errors and :exc:`ExtractError` for *non-fatal* ones.
python, official-docs, cpython, P0
Local_Trusted_Corpus
5d61a655-eb04-4273-8f06-076daaba4411
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,941
supabase-export-v2
4d21d3a134db87b5
| +------------------+---------------------------------------------+ | ``'w:zst'`` | Open for Zstandard compressed writing. | +------------------+---------------------------------------------+ Note that ``'a:gz'``, ``'a:bz2'`` or ``'a:xz'`` is not possible. If *mode* is not suitable to open a certain (compressed) file...
trusted_official_docs
CPython Docs
| +------------------+---------------------------------------------+ | ``'w:zst'`` | Open for Zstandard compressed writing. | +------------------+---------------------------------------------+ Note that ``'a:gz'``, ``'a:bz2'`` or ``'a:xz'`` is not possible. If *mode* is not suitable to open a certain (compressed) file...
| +------------------+---------------------------------------------+ | ``'w:zst'`` | Open for Zstandard compressed writing. | +------------------+---------------------------------------------+ Note that ``'a:gz'``, ``'a:bz2'`` or ``'a:xz'`` is not possible. If *mode* is not suitable to open a certain (compressed) file...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5d69cd02-7c5f-4dfd-9535-00897d8fb73c
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,035
supabase-export-v2
dae3f7a1029046cf
file, ``'w'`` to create a new file overwriting an existing one, or ``'x'`` to create a new file only if it does not already exist. If *fileobj* is given, it is used for reading or writing data. If it can be determined, *mode* is overridden by *fileobj*'s mode. *fileobj* will be used from position 0.
trusted_official_docs
CPython Docs
file, ``'w'`` to create a new file overwriting an existing one, or ``'x'`` to create a new file only if it does not already exist. If *fileobj* is given, it is used for reading or writing data. If it can be determined, *mode* is overridden by *fileobj*'s mode. *fileobj* will be used from position 0.
file, ``'w'`` to create a new file overwriting an existing one, or ``'x'`` to create a new file only if it does not already exist. If *fileobj* is given, it is used for reading or writing data. If it can be determined, *mode* is overridden by *fileobj*'s mode. *fileobj* will be used from position 0.
python, official-docs, cpython, P0
Local_Trusted_Corpus
5e51db5d-a8cf-496f-835d-f25a20552a65
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,062
supabase-export-v2
5d9fe3f4da162468
.. method:: TarFile.list(verbose=True, *, members=None) Print a table of contents to ``sys.stdout``. If *verbose* is :const:`False`, only the names of the members are printed. If it is :const:`True`, output similar to that of :program:`ls -l` is produced. If optional *members* is given, it must be a subset of the li...
trusted_official_docs
CPython Docs
.. method:: TarFile.list(verbose=True, *, members=None) Print a table of contents to ``sys.stdout``. If *verbose* is :const:`False`, only the names of the members are printed. If it is :const:`True`, output similar to that of :program:`ls -l` is produced. If optional *members* is given, it must be a subset of the li...
.. method:: TarFile.list(verbose=True, *, members=None) Print a table of contents to ``sys.stdout``. If *verbose* is :const:`False`, only the names of the members are printed. If it is :const:`True`, output similar to that of :program:`ls -l` is produced. If optional *members* is given, it must be a subset of the li...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5fe32b00-78b0-4011-af78-d3bb215893d8
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,115
supabase-export-v2
86dbad0f35796432
the file in the archive, otherwise, the name is taken from *fileobj*’s :attr:`~io.FileIO.name` attribute, or the *name* argument. The name should be a text string. You can modify some of the :class:`TarInfo`’s attributes before you add it using :meth:`addfile`. If the file object is not an ordinary file object positio...
trusted_official_docs
CPython Docs
the file in the archive, otherwise, the name is taken from *fileobj*’s :attr:`~io.FileIO.name` attribute, or the *name* argument. The name should be a text string. You can modify some of the :class:`TarInfo`’s attributes before you add it using :meth:`addfile`. If the file object is not an ordinary file object positio...
the file in the archive, otherwise, the name is taken from *fileobj*’s :attr:`~io.FileIO.name` attribute, or the *name* argument. The name should be a text string. You can modify some of the :class:`TarInfo`’s attributes before you add it using :meth:`addfile`. If the file object is not an ordinary file object positio...
python, official-docs, cpython, P0
Local_Trusted_Corpus
60b131b8-842d-44bc-87da-1f2a6200fc48
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,935
supabase-export-v2
1fc488e965a54925
Return a :class:`TarFile` object for the pathname *name*. For detailed information on :class:`TarFile` objects and the keyword arguments that are allowed, see :ref:`tarfile-objects`. *mode* has to be a string of the form ``'filemode[:compression]'``, it defaults to ``'r'``. Here is a full list of mode combinations:
trusted_official_docs
CPython Docs
Return a :class:`TarFile` object for the pathname *name*. For detailed information on :class:`TarFile` objects and the keyword arguments that are allowed, see :ref:`tarfile-objects`. *mode* has to be a string of the form ``'filemode[:compression]'``, it defaults to ``'r'``. Here is a full list of mode combinations:
Return a :class:`TarFile` object for the pathname *name*. For detailed information on :class:`TarFile` objects and the keyword arguments that are allowed, see :ref:`tarfile-objects`. *mode* has to be a string of the form ``'filemode[:compression]'``, it defaults to ``'r'``. Here is a full list of mode combinations:
python, official-docs, cpython, P0
Local_Trusted_Corpus
68402824-87df-44ac-aa0c-0bd508cbb3ec
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,936
supabase-export-v2
f30f8a99ad777a4d
*mode* has to be a string of the form ``'filemode[:compression]'``, it defaults to ``'r'``. Here is a full list of mode combinations: +------------------+---------------------------------------------+ | mode | action | +==================+=============================================+ | ``'r'`` or | Open for reading...
trusted_official_docs
CPython Docs
*mode* has to be a string of the form ``'filemode[:compression]'``, it defaults to ``'r'``. Here is a full list of mode combinations: +------------------+---------------------------------------------+ | mode | action | +==================+=============================================+ | ``'r'`` or | Open for reading...
*mode* has to be a string of the form ``'filemode[:compression]'``, it defaults to ``'r'``. Here is a full list of mode combinations: +------------------+---------------------------------------------+ | mode | action | +==================+=============================================+ | ``'r'`` or | Open for reading...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6a24b404-834d-44c4-8ce8-d5669fb28df1
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,220
supabase-export-v2
615565493390977e
Honor most *tar*-specific features (i.e. features of UNIX-like filesystems), but block features that are very likely to be surprising or malicious. See :func:`tar_filter` for details. * the string ``'data'``: Ignore or block most features specific to UNIX-like filesystems. Intended for extracting cross-platform data a...
trusted_official_docs
CPython Docs
Honor most *tar*-specific features (i.e. features of UNIX-like filesystems), but block features that are very likely to be surprising or malicious. See :func:`tar_filter` for details. * the string ``'data'``: Ignore or block most features specific to UNIX-like filesystems. Intended for extracting cross-platform data a...
Honor most *tar*-specific features (i.e. features of UNIX-like filesystems), but block features that are very likely to be surprising or malicious. See :func:`tar_filter` for details. * the string ``'data'``: Ignore or block most features specific to UNIX-like filesystems. Intended for extracting cross-platform data a...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6f5ef999-05fb-4716-9d84-8dcb8da194dd
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,155
supabase-export-v2
2bb1c374981413b0
Name of the target file name, which is only present in :class:`TarInfo` objects of type :const:`LNKTYPE` and :const:`SYMTYPE`. For symbolic links (``SYMTYPE``), the *linkname* is relative to the directory that contains the link. For hard links (``LNKTYPE``), the *linkname* is relative to the root of the archive.
trusted_official_docs
CPython Docs
Name of the target file name, which is only present in :class:`TarInfo` objects of type :const:`LNKTYPE` and :const:`SYMTYPE`. For symbolic links (``SYMTYPE``), the *linkname* is relative to the directory that contains the link. For hard links (``LNKTYPE``), the *linkname* is relative to the root of the archive.
Name of the target file name, which is only present in :class:`TarInfo` objects of type :const:`LNKTYPE` and :const:`SYMTYPE`. For symbolic links (``SYMTYPE``), the *linkname* is relative to the directory that contains the link. For hard links (``LNKTYPE``), the *linkname* is relative to the root of the archive.
python, official-docs, cpython, P0
Local_Trusted_Corpus
6fe34cdd-f320-4cd1-9340-25d78740c270
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,186
supabase-export-v2
3e6e379463e20bea
.. versionadded:: 3.12 Return a *new* copy of the :class:`!TarInfo` object with the given attributes changed. For example, to return a ``TarInfo`` with the group name set to ``'staff'``, use::
trusted_official_docs
CPython Docs
.. versionadded:: 3.12 Return a *new* copy of the :class:`!TarInfo` object with the given attributes changed. For example, to return a ``TarInfo`` with the group name set to ``'staff'``, use::
.. versionadded:: 3.12 Return a *new* copy of the :class:`!TarInfo` object with the given attributes changed. For example, to return a ``TarInfo`` with the group name set to ``'staff'``, use::
python, official-docs, cpython, P0
Local_Trusted_Corpus
706658b5-5cdb-4543-9084-269bdefc10ec
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,047
supabase-export-v2
cab7b8b1bda37ba5
If *stream* is set to :const:`True` then while reading the archive info about files in the archive are not cached, saving memory. .. versionchanged:: 3.2 Use ``'surrogateescape'`` as the default for the *errors* argument.
trusted_official_docs
CPython Docs
If *stream* is set to :const:`True` then while reading the archive info about files in the archive are not cached, saving memory. .. versionchanged:: 3.2 Use ``'surrogateescape'`` as the default for the *errors* argument.
If *stream* is set to :const:`True` then while reading the archive info about files in the archive are not cached, saving memory. .. versionchanged:: 3.2 Use ``'surrogateescape'`` as the default for the *errors* argument.
python, official-docs, cpython, P0
Local_Trusted_Corpus
738c07b5-8021-4b31-ae3f-f25b30005e4a
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,063
supabase-export-v2
1985c883bbdccb5d
output similar to that of :program:`ls -l` is produced. If optional *members* is given, it must be a subset of the list returned by :meth:`getmembers`. .. versionchanged:: 3.5 Added the *members* parameter.
trusted_official_docs
CPython Docs
output similar to that of :program:`ls -l` is produced. If optional *members* is given, it must be a subset of the list returned by :meth:`getmembers`. .. versionchanged:: 3.5 Added the *members* parameter.
output similar to that of :program:`ls -l` is produced. If optional *members* is given, it must be a subset of the list returned by :meth:`getmembers`. .. versionchanged:: 3.5 Added the *members* parameter.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7446a850-712b-4c7b-9eeb-bc01366edbda
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,246
supabase-export-v2
7291ea12b138b152
- For regular files, including hard links: - Set the owner read and write permissions (:const:`~stat.S_IRUSR` | :const:`~stat.S_IWUSR`). - Remove the group & other executable permission (:const:`~stat.S_IXGRP` | :const:`~stat.S_IXOTH`) if the owner doesn’t have it (:const:`~stat.S_IXUSR`).
trusted_official_docs
CPython Docs
- For regular files, including hard links: - Set the owner read and write permissions (:const:`~stat.S_IRUSR` | :const:`~stat.S_IWUSR`). - Remove the group & other executable permission (:const:`~stat.S_IXGRP` | :const:`~stat.S_IXOTH`) if the owner doesn’t have it (:const:`~stat.S_IXUSR`).
- For regular files, including hard links: - Set the owner read and write permissions (:const:`~stat.S_IRUSR` | :const:`~stat.S_IWUSR`). - Remove the group & other executable permission (:const:`~stat.S_IXGRP` | :const:`~stat.S_IXOTH`) if the owner doesn’t have it (:const:`~stat.S_IXUSR`).
python, official-docs, cpython, P0
Local_Trusted_Corpus
74619075-8f47-47f8-adf6-c232f2dfb5b2
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,044
supabase-export-v2
30d9ec8746a1d6b3
*errorlevel* controls how extraction errors are handled, see :attr:`the corresponding attribute <TarFile.errorlevel>`. The *encoding* and *errors* arguments define the character encoding to be used for reading or writing the archive and how conversion errors are going to be handled. The default settings will work for...
trusted_official_docs
CPython Docs
*errorlevel* controls how extraction errors are handled, see :attr:`the corresponding attribute <TarFile.errorlevel>`. The *encoding* and *errors* arguments define the character encoding to be used for reading or writing the archive and how conversion errors are going to be handled. The default settings will work for...
*errorlevel* controls how extraction errors are handled, see :attr:`the corresponding attribute <TarFile.errorlevel>`. The *encoding* and *errors* arguments define the character encoding to be used for reading or writing the archive and how conversion errors are going to be handled. The default settings will work for...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7555bf77-6e4d-40ea-b5fc-5095f318b17f
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,328
supabase-export-v2
b4270b80d9798648
import tarfile with tarfile.open("sample.tar", "w") as tar: for name in ["foo", "bar", "quux"]: tar.add(name) How to create and write an archive to stdout using :data:`sys.stdout.buffer <sys.stdout>` in the *fileobj* parameter in :meth:`TarFile.add`::
trusted_official_docs
CPython Docs
import tarfile with tarfile.open("sample.tar", "w") as tar: for name in ["foo", "bar", "quux"]: tar.add(name) How to create and write an archive to stdout using :data:`sys.stdout.buffer <sys.stdout>` in the *fileobj* parameter in :meth:`TarFile.add`::
import tarfile with tarfile.open("sample.tar", "w") as tar: for name in ["foo", "bar", "quux"]: tar.add(name) How to create and write an archive to stdout using :data:`sys.stdout.buffer <sys.stdout>` in the *fileobj* parameter in :meth:`TarFile.add`::
python, official-docs, cpython, P0
Local_Trusted_Corpus
75a40ae1-b7af-45e9-941b-abb044b34c22
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,030
supabase-export-v2
7ed33f66a43be3f8
archive opened for writing will not be finalized; only the internally used file object will be closed. See the :ref:`tar-examples` section for a use case. .. versionadded:: 3.2 Added support for the context management protocol.
trusted_official_docs
CPython Docs
archive opened for writing will not be finalized; only the internally used file object will be closed. See the :ref:`tar-examples` section for a use case. .. versionadded:: 3.2 Added support for the context management protocol.
archive opened for writing will not be finalized; only the internally used file object will be closed. See the :ref:`tar-examples` section for a use case. .. versionadded:: 3.2 Added support for the context management protocol.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7602fb74-fe97-4a09-beb8-093d8d226abe
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,945
supabase-export-v2
a24a0de605ab84de
For modes ``'w:xz'``, ``'x:xz'`` and ``'w|xz'``, :func:`tarfile.open` accepts the keyword argument *preset* to specify the compression level of the file. For modes ``'w:zst'``, ``'x:zst'`` and ``'w|zst'``, :func:`tarfile.open` accepts the keyword argument *level* to specify the compression level of the file. The keyw...
trusted_official_docs
CPython Docs
For modes ``'w:xz'``, ``'x:xz'`` and ``'w|xz'``, :func:`tarfile.open` accepts the keyword argument *preset* to specify the compression level of the file. For modes ``'w:zst'``, ``'x:zst'`` and ``'w|zst'``, :func:`tarfile.open` accepts the keyword argument *level* to specify the compression level of the file. The keyw...
For modes ``'w:xz'``, ``'x:xz'`` and ``'w|xz'``, :func:`tarfile.open` accepts the keyword argument *preset* to specify the compression level of the file. For modes ``'w:zst'``, ``'x:zst'`` and ``'w|zst'``, :func:`tarfile.open` accepts the keyword argument *level* to specify the compression level of the file. The keyw...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7a5a769e-2410-42df-bae4-126797e90e0d
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,276
supabase-export-v2
ba9d389023b8e762
Stateful extraction filter example ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ While *tarfile*'s extraction methods take a simple *filter* callable, custom filters may be more complex objects with an internal state. It may be useful to write these as context managers, to be used like this::
trusted_official_docs
CPython Docs
Stateful extraction filter example ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ While *tarfile*'s extraction methods take a simple *filter* callable, custom filters may be more complex objects with an internal state. It may be useful to write these as context managers, to be used like this::
Stateful extraction filter example ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ While *tarfile*'s extraction methods take a simple *filter* callable, custom filters may be more complex objects with an internal state. It may be useful to write these as context managers, to be used like this::
python, official-docs, cpython, P0
Local_Trusted_Corpus
7a6fbca2-0064-4419-9e0f-47d53ebdfc7c
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,949
supabase-export-v2
08c527493e06eabd
Open a gzip compressed *stream* for | | | reading. | +-------------+--------------------------------------------+ | ``'r|bz2'`` | Open a bzip2 compressed *stream* for | | | reading. | +-------------+--------------------------------------------+ | ``'r|xz'`` | Open an lzma compressed *stream* for | | | reading. | +-...
trusted_official_docs
CPython Docs
Open a gzip compressed *stream* for | | | reading. | +-------------+--------------------------------------------+ | ``'r|bz2'`` | Open a bzip2 compressed *stream* for | | | reading. | +-------------+--------------------------------------------+ | ``'r|xz'`` | Open an lzma compressed *stream* for | | | reading. | +-...
Open a gzip compressed *stream* for | | | reading. | +-------------+--------------------------------------------+ | ``'r|bz2'`` | Open a bzip2 compressed *stream* for | | | reading. | +-------------+--------------------------------------------+ | ``'r|xz'`` | Open an lzma compressed *stream* for | | | reading. | +-...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7b17cd28-ff93-4480-84ad-c664c4928655
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,096
supabase-export-v2
eed2f43b78749fb9
Custom :ref:`extraction filters <tarfile-extraction-filter>` should raise :exc:`FilterError` for *fatal* errors and :exc:`ExtractError` for *non-fatal* ones. Note that when an exception is raised, the archive may be partially extracted. It is the user’s responsibility to clean up.
trusted_official_docs
CPython Docs
Custom :ref:`extraction filters <tarfile-extraction-filter>` should raise :exc:`FilterError` for *fatal* errors and :exc:`ExtractError` for *non-fatal* ones. Note that when an exception is raised, the archive may be partially extracted. It is the user’s responsibility to clean up.
Custom :ref:`extraction filters <tarfile-extraction-filter>` should raise :exc:`FilterError` for *fatal* errors and :exc:`ExtractError` for *non-fatal* ones. Note that when an exception is raised, the archive may be partially extracted. It is the user’s responsibility to clean up.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7c25ff03-1d8a-4f87-a2c2-b32db965d58e
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,100
supabase-export-v2
e437cfc25d3a788d
The :ref:`extraction filter <tarfile-extraction-filter>` used as a default for the *filter* argument of :meth:`~TarFile.extract` and :meth:`~TarFile.extractall`. The attribute may be ``None`` or a callable. String names are not allowed for this attribute, unlike the *filter* argument to :meth:`~TarFile.extract`.
trusted_official_docs
CPython Docs
The :ref:`extraction filter <tarfile-extraction-filter>` used as a default for the *filter* argument of :meth:`~TarFile.extract` and :meth:`~TarFile.extractall`. The attribute may be ``None`` or a callable. String names are not allowed for this attribute, unlike the *filter* argument to :meth:`~TarFile.extract`.
The :ref:`extraction filter <tarfile-extraction-filter>` used as a default for the *filter* argument of :meth:`~TarFile.extract` and :meth:`~TarFile.extractall`. The attribute may be ``None`` or a callable. String names are not allowed for this attribute, unlike the *filter* argument to :meth:`~TarFile.extract`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7df13b71-6ab3-4911-b683-63a70e569f21
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,927
supabase-export-v2
04cd89e54923063d
* read/write support for the POSIX.1-2001 (pax) format. * handles directories, regular files, hardlinks, symbolic links, fifos, character devices and block devices and is able to acquire and restore file information like timestamp, access permissions and owner.
trusted_official_docs
CPython Docs
* read/write support for the POSIX.1-2001 (pax) format. * handles directories, regular files, hardlinks, symbolic links, fifos, character devices and block devices and is able to acquire and restore file information like timestamp, access permissions and owner.
* read/write support for the POSIX.1-2001 (pax) format. * handles directories, regular files, hardlinks, symbolic links, fifos, character devices and block devices and is able to acquire and restore file information like timestamp, access permissions and owner.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7e8f86fa-6cfd-4308-bc11-ecae7ef67375
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,189
supabase-export-v2
7812558caaa3b67f
deep copy is made. If *deep* is false, the copy is shallow, i.e. ``pax_headers`` and any custom attributes are shared with the original ``TarInfo`` object. A :class:`TarInfo` object also provides some convenient query methods:
trusted_official_docs
CPython Docs
deep copy is made. If *deep* is false, the copy is shallow, i.e. ``pax_headers`` and any custom attributes are shared with the original ``TarInfo`` object. A :class:`TarInfo` object also provides some convenient query methods:
deep copy is made. If *deep* is false, the copy is shallow, i.e. ``pax_headers`` and any custom attributes are shared with the original ``TarInfo`` object. A :class:`TarInfo` object also provides some convenient query methods:
python, official-docs, cpython, P0
Local_Trusted_Corpus
7fc647b9-77d7-4b1a-83f1-5ec21a50cfa1
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,259
supabase-export-v2
b183e4639ec0c010
Here is an incomplete list of things to consider: * Extract to a :func:`new temporary directory <tempfile.mkdtemp>` to prevent e.g. exploiting pre-existing links, and to make it easier to clean up after a failed extraction. * Disallow symbolic links if you do not need the functionality. * When working with untrusted ...
trusted_official_docs
CPython Docs
Here is an incomplete list of things to consider: * Extract to a :func:`new temporary directory <tempfile.mkdtemp>` to prevent e.g. exploiting pre-existing links, and to make it easier to clean up after a failed extraction. * Disallow symbolic links if you do not need the functionality. * When working with untrusted ...
Here is an incomplete list of things to consider: * Extract to a :func:`new temporary directory <tempfile.mkdtemp>` to prevent e.g. exploiting pre-existing links, and to make it easier to clean up after a failed extraction. * Disallow symbolic links if you do not need the functionality. * When working with untrusted ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8184bcfe-49e7-42c9-a175-32b1b2565d5d
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,156
supabase-export-v2
2cb10a8f25a5e755
the *linkname* is relative to the directory that contains the link. For hard links (``LNKTYPE``), the *linkname* is relative to the root of the archive. .. attribute:: TarInfo.uid :type: int
trusted_official_docs
CPython Docs
the *linkname* is relative to the directory that contains the link. For hard links (``LNKTYPE``), the *linkname* is relative to the root of the archive. .. attribute:: TarInfo.uid :type: int
the *linkname* is relative to the directory that contains the link. For hard links (``LNKTYPE``), the *linkname* is relative to the root of the archive. .. attribute:: TarInfo.uid :type: int
python, official-docs, cpython, P0
Local_Trusted_Corpus
82021bbc-d81a-43f8-8142-402cb3aa18a8
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,948
supabase-export-v2
ce25b4a846000656
or a tape device. However, such a :class:`TarFile` object is limited in that it does not allow random access, see :ref:`tar-examples`. The currently possible modes: +-------------+--------------------------------------------+ | Mode | Action | +=============+============================================+ | ``'r|*'`` ...
trusted_official_docs
CPython Docs
or a tape device. However, such a :class:`TarFile` object is limited in that it does not allow random access, see :ref:`tar-examples`. The currently possible modes: +-------------+--------------------------------------------+ | Mode | Action | +=============+============================================+ | ``'r|*'`` ...
or a tape device. However, such a :class:`TarFile` object is limited in that it does not allow random access, see :ref:`tar-examples`. The currently possible modes: +-------------+--------------------------------------------+ | Mode | Action | +=============+============================================+ | ``'r|*'`` ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8218a2af-7a95-4468-9011-f2cebee04ada
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,101
supabase-export-v2
424eed8b22c34212
The attribute may be ``None`` or a callable. String names are not allowed for this attribute, unlike the *filter* argument to :meth:`~TarFile.extract`. If ``extraction_filter`` is ``None`` (the default), extraction methods will use the :func:`data <data_filter>` filter by default.
trusted_official_docs
CPython Docs
The attribute may be ``None`` or a callable. String names are not allowed for this attribute, unlike the *filter* argument to :meth:`~TarFile.extract`. If ``extraction_filter`` is ``None`` (the default), extraction methods will use the :func:`data <data_filter>` filter by default.
The attribute may be ``None`` or a callable. String names are not allowed for this attribute, unlike the *filter* argument to :meth:`~TarFile.extract`. If ``extraction_filter`` is ``None`` (the default), extraction methods will use the :func:`data <data_filter>` filter by default.
python, official-docs, cpython, P0
Local_Trusted_Corpus
85c35f75-1775-4bb8-a355-6a8078d6c793
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,955
supabase-export-v2
acd1248a81b71ce4
.. versionchanged:: 3.14 The *preset* keyword argument also works for streams. .. versionchanged:: 3.15 The default compression level was reduced to 6 (down from 9). It is the default level used by most compression tools and a better tradeoff between speed and performance.
trusted_official_docs
CPython Docs
.. versionchanged:: 3.14 The *preset* keyword argument also works for streams. .. versionchanged:: 3.15 The default compression level was reduced to 6 (down from 9). It is the default level used by most compression tools and a better tradeoff between speed and performance.
.. versionchanged:: 3.14 The *preset* keyword argument also works for streams. .. versionchanged:: 3.15 The default compression level was reduced to 6 (down from 9). It is the default level used by most compression tools and a better tradeoff between speed and performance.
python, official-docs, cpython, P0
Local_Trusted_Corpus
87b952f7-0d09-4837-ad55-293dbb331379
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,188
supabase-export-v2
b8d43d038b9f4af7
new_tarinfo = old_tarinfo.replace(gname='staff') By default, a deep copy is made. If *deep* is false, the copy is shallow, i.e. ``pax_headers`` and any custom attributes are shared with the original ``TarInfo`` object.
trusted_official_docs
CPython Docs
new_tarinfo = old_tarinfo.replace(gname='staff') By default, a deep copy is made. If *deep* is false, the copy is shallow, i.e. ``pax_headers`` and any custom attributes are shared with the original ``TarInfo`` object.
new_tarinfo = old_tarinfo.replace(gname='staff') By default, a deep copy is made. If *deep* is false, the copy is shallow, i.e. ``pax_headers`` and any custom attributes are shared with the original ``TarInfo`` object.
python, official-docs, cpython, P0
Local_Trusted_Corpus
8962025b-fa71-4092-beab-0043610a2617
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,287
supabase-export-v2
5c98cfe27f566a83
The :mod:`!tarfile` module provides a simple command-line interface to interact with tar archives. If you want to create a new tar archive, specify its name after the :option:`-c` option and then list the filename(s) that should be included:
trusted_official_docs
CPython Docs
The :mod:`!tarfile` module provides a simple command-line interface to interact with tar archives. If you want to create a new tar archive, specify its name after the :option:`-c` option and then list the filename(s) that should be included:
The :mod:`!tarfile` module provides a simple command-line interface to interact with tar archives. If you want to create a new tar archive, specify its name after the :option:`-c` option and then list the filename(s) that should be included:
python, official-docs, cpython, P0
Local_Trusted_Corpus
904f4ade-4d9a-4abd-a8c9-224c577481ed
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,346
supabase-export-v2
bc2cdbca7b41e10d
whether the archive is read or written, the metadata must be either decoded or encoded. If *encoding* is not set appropriately, this conversion may fail. The *errors* argument defines how characters are treated that cannot be converted. Possible values are listed in section :ref:`error-handlers`. The default scheme is ...
trusted_official_docs
CPython Docs
whether the archive is read or written, the metadata must be either decoded or encoded. If *encoding* is not set appropriately, this conversion may fail. The *errors* argument defines how characters are treated that cannot be converted. Possible values are listed in section :ref:`error-handlers`. The default scheme is ...
whether the archive is read or written, the metadata must be either decoded or encoded. If *encoding* is not set appropriately, this conversion may fail. The *errors* argument defines how characters are treated that cannot be converted. Possible values are listed in section :ref:`error-handlers`. The default scheme is ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
90b043b3-c653-406a-80c1-d331e2191ed2
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,114
supabase-export-v2
f631d79e9875e466
.. method:: TarFile.gettarinfo(name=None, arcname=None, fileobj=None) Create a :class:`TarInfo` object from the result of :func:`os.stat` or equivalent on an existing file. The file is either named by *name*, or specified as a :term:`file object` *fileobj* with a file descriptor. *name* may be a :term:`path-like obje...
trusted_official_docs
CPython Docs
.. method:: TarFile.gettarinfo(name=None, arcname=None, fileobj=None) Create a :class:`TarInfo` object from the result of :func:`os.stat` or equivalent on an existing file. The file is either named by *name*, or specified as a :term:`file object` *fileobj* with a file descriptor. *name* may be a :term:`path-like obje...
.. method:: TarFile.gettarinfo(name=None, arcname=None, fileobj=None) Create a :class:`TarInfo` object from the result of :func:`os.stat` or equivalent on an existing file. The file is either named by *name*, or specified as a :term:`file object` *fileobj* with a file descriptor. *name* may be a :term:`path-like obje...
python, official-docs, cpython, P0
Local_Trusted_Corpus
935a95da-4b4f-44bd-b98d-db85db0cd795
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,042
supabase-export-v2
2f0f2ac0d5a5ac9c
:const:`True`, skip empty (and invalid) blocks and try to get as many members as possible. This is only useful for reading concatenated or damaged archives. *debug* can be set from ``0`` (no debug messages) up to ``3`` (all debug messages). The messages are written to ``sys.stderr``.
trusted_official_docs
CPython Docs
:const:`True`, skip empty (and invalid) blocks and try to get as many members as possible. This is only useful for reading concatenated or damaged archives. *debug* can be set from ``0`` (no debug messages) up to ``3`` (all debug messages). The messages are written to ``sys.stderr``.
:const:`True`, skip empty (and invalid) blocks and try to get as many members as possible. This is only useful for reading concatenated or damaged archives. *debug* can be set from ``0`` (no debug messages) up to ``3`` (all debug messages). The messages are written to ``sys.stderr``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
939b01f8-f1f0-4245-8f72-e2500cee2dba
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,264
supabase-export-v2
db9fbf7ed0ed64c1
be backported to older versions as security updates. To check whether the feature is available, use e.g. ``hasattr(tarfile, 'data_filter')`` rather than checking the Python version. The following examples show how to support Python versions with and without the feature. Note that setting ``extraction_filter`` will affe...
trusted_official_docs
CPython Docs
be backported to older versions as security updates. To check whether the feature is available, use e.g. ``hasattr(tarfile, 'data_filter')`` rather than checking the Python version. The following examples show how to support Python versions with and without the feature. Note that setting ``extraction_filter`` will affe...
be backported to older versions as security updates. To check whether the feature is available, use e.g. ``hasattr(tarfile, 'data_filter')`` rather than checking the Python version. The following examples show how to support Python versions with and without the feature. Note that setting ``extraction_filter`` will affe...
python, official-docs, cpython, P0
Local_Trusted_Corpus
955751bc-db1d-4854-b6be-17de8c6e37be
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,263
supabase-export-v2
017f85611656a872
Supporting older Python versions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Extraction filters were added to Python 3.12, but may be backported to older versions as security updates. To check whether the feature is available, use e.g. ``hasattr(tarfile, 'data_filter')`` rather than checking the Python version.
trusted_official_docs
CPython Docs
Supporting older Python versions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Extraction filters were added to Python 3.12, but may be backported to older versions as security updates. To check whether the feature is available, use e.g. ``hasattr(tarfile, 'data_filter')`` rather than checking the Python version.
Supporting older Python versions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Extraction filters were added to Python 3.12, but may be backported to older versions as security updates. To check whether the feature is available, use e.g. ``hasattr(tarfile, 'data_filter')`` rather than checking the Python version.
python, official-docs, cpython, P0
Local_Trusted_Corpus
95d93d5c-51ab-40c0-98ec-93e3eed0ac12
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,107
supabase-export-v2
73b115c10b00e5ce
and returns the changed :class:`TarInfo` object. If it instead returns :const:`None` the :class:`TarInfo` object will be excluded from the archive. See :ref:`tar-examples` for an example. .. versionchanged:: 3.2 Added the *filter* parameter.
trusted_official_docs
CPython Docs
and returns the changed :class:`TarInfo` object. If it instead returns :const:`None` the :class:`TarInfo` object will be excluded from the archive. See :ref:`tar-examples` for an example. .. versionchanged:: 3.2 Added the *filter* parameter.
and returns the changed :class:`TarInfo` object. If it instead returns :const:`None` the :class:`TarInfo` object will be excluded from the archive. See :ref:`tar-examples` for an example. .. versionchanged:: 3.2 Added the *filter* parameter.
python, official-docs, cpython, P0
Local_Trusted_Corpus
95e1b207-cefd-4047-9efa-5508ec9c2c54
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,924
supabase-export-v2
9be5356f5dd1c57c
from your copy of CPython, look for documentation from your distributor (that is, whoever provided Python to you). If you are the distributor, see :ref:`optional-module-requirements`. * read/write support for the POSIX.1-1988 (ustar) format.
trusted_official_docs
CPython Docs
from your copy of CPython, look for documentation from your distributor (that is, whoever provided Python to you). If you are the distributor, see :ref:`optional-module-requirements`. * read/write support for the POSIX.1-1988 (ustar) format.
from your copy of CPython, look for documentation from your distributor (that is, whoever provided Python to you). If you are the distributor, see :ref:`optional-module-requirements`. * read/write support for the POSIX.1-1988 (ustar) format.
python, official-docs, cpython, P0
Local_Trusted_Corpus
99eb7827-f73e-43ac-8cad-0031fbcd35a1
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,926
supabase-export-v2
aa5693f20d7fe036
support for the GNU tar format including *longname* and *longlink* extensions, read-only support for all variants of the *sparse* extension including restoration of sparse files. * read/write support for the POSIX.1-2001 (pax) format.
trusted_official_docs
CPython Docs
support for the GNU tar format including *longname* and *longlink* extensions, read-only support for all variants of the *sparse* extension including restoration of sparse files. * read/write support for the POSIX.1-2001 (pax) format.
support for the GNU tar format including *longname* and *longlink* extensions, read-only support for all variants of the *sparse* extension including restoration of sparse files. * read/write support for the POSIX.1-2001 (pax) format.
python, official-docs, cpython, P0
Local_Trusted_Corpus
9ae24ee8-ff5f-4c24-b507-3c42b4496d27
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,923
supabase-export-v2
20ab475689eab92e
.. The following paragraph should be similar to ../includes/optional-module.rst If any of these :term:`optional modules <optional module>` are missing from your copy of CPython, look for documentation from your distributor (that is, whoever provided Python to you). If you are the distributor, see :ref:`optional-modul...
trusted_official_docs
CPython Docs
.. The following paragraph should be similar to ../includes/optional-module.rst If any of these :term:`optional modules <optional module>` are missing from your copy of CPython, look for documentation from your distributor (that is, whoever provided Python to you). If you are the distributor, see :ref:`optional-modul...
.. The following paragraph should be similar to ../includes/optional-module.rst If any of these :term:`optional modules <optional module>` are missing from your copy of CPython, look for documentation from your distributor (that is, whoever provided Python to you). If you are the distributor, see :ref:`optional-modul...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9b59a851-38df-42dd-8fe8-d518a773c891
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,934
supabase-export-v2
3642f9294aa6d90c
.. function:: open(name=None, mode='r', fileobj=None, bufsize=10240, **kwargs) Return a :class:`TarFile` object for the pathname *name*. For detailed information on :class:`TarFile` objects and the keyword arguments that are allowed, see :ref:`tarfile-objects`.
trusted_official_docs
CPython Docs
.. function:: open(name=None, mode='r', fileobj=None, bufsize=10240, **kwargs) Return a :class:`TarFile` object for the pathname *name*. For detailed information on :class:`TarFile` objects and the keyword arguments that are allowed, see :ref:`tarfile-objects`.
.. function:: open(name=None, mode='r', fileobj=None, bufsize=10240, **kwargs) Return a :class:`TarFile` object for the pathname *name*. For detailed information on :class:`TarFile` objects and the keyword arguments that are allowed, see :ref:`tarfile-objects`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
9beaefd5-9009-4251-aa53-65f2f29d4274
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,090
supabase-export-v2
eef9335326be3ddc
link, an :class:`io.BufferedReader` object is returned. For all other existing members, :const:`None` is returned. If *member* does not appear in the archive, :exc:`KeyError` is raised. .. versionchanged:: 3.3 Return an :class:`io.BufferedReader` object.
trusted_official_docs
CPython Docs
link, an :class:`io.BufferedReader` object is returned. For all other existing members, :const:`None` is returned. If *member* does not appear in the archive, :exc:`KeyError` is raised. .. versionchanged:: 3.3 Return an :class:`io.BufferedReader` object.
link, an :class:`io.BufferedReader` object is returned. For all other existing members, :const:`None` is returned. If *member* does not appear in the archive, :exc:`KeyError` is raised. .. versionchanged:: 3.3 Return an :class:`io.BufferedReader` object.
python, official-docs, cpython, P0
Local_Trusted_Corpus
9e675dc9-a084-4f13-8fd7-b0aef792758d
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,343
supabase-export-v2
7db726e92a5da3c9
Unicode issues -------------- The tar format was originally conceived to make backups on tape drives with the main focus on preserving file system information. Nowadays tar archives are commonly used for file distribution and exchanging archives over networks. One problem of the original format (which is the basis of a...
trusted_official_docs
CPython Docs
Unicode issues -------------- The tar format was originally conceived to make backups on tape drives with the main focus on preserving file system information. Nowadays tar archives are commonly used for file distribution and exchanging archives over networks. One problem of the original format (which is the basis of a...
Unicode issues -------------- The tar format was originally conceived to make backups on tape drives with the main focus on preserving file system information. Nowadays tar archives are commonly used for file distribution and exchanging archives over networks. One problem of the original format (which is the basis of a...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9f4029ff-a9fb-4cce-8bf4-7c5345c348d8
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,937
supabase-export-v2
a23ed020191a8e19
| | compression. | +------------------+---------------------------------------------+ | ``'r:gz'`` | Open for reading with gzip compression. | +------------------+---------------------------------------------+ | ``'r:bz2'`` | Open for reading with bzip2 compression. | +------------------+------------------------------...
trusted_official_docs
CPython Docs
| | compression. | +------------------+---------------------------------------------+ | ``'r:gz'`` | Open for reading with gzip compression. | +------------------+---------------------------------------------+ | ``'r:bz2'`` | Open for reading with bzip2 compression. | +------------------+------------------------------...
| | compression. | +------------------+---------------------------------------------+ | ``'r:gz'`` | Open for reading with gzip compression. | +------------------+---------------------------------------------+ | ``'r:bz2'`` | Open for reading with bzip2 compression. | +------------------+------------------------------...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a3f0f37a-0a56-43e7-8ef5-ff39df2f56dc
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,228
supabase-export-v2
50a500882253609e
The callable is called just before each member is extracted, so it can take the current state of the disk into account. It can: - return a :class:`TarInfo` object which will be used instead of the metadata in the archive, or - return ``None``, in which case the member will be skipped, or - raise an exception to abor...
trusted_official_docs
CPython Docs
The callable is called just before each member is extracted, so it can take the current state of the disk into account. It can: - return a :class:`TarInfo` object which will be used instead of the metadata in the archive, or - return ``None``, in which case the member will be skipped, or - raise an exception to abor...
The callable is called just before each member is extracted, so it can take the current state of the disk into account. It can: - return a :class:`TarInfo` object which will be used instead of the metadata in the archive, or - return ``None``, in which case the member will be skipped, or - raise an exception to abor...
python, official-docs, cpython, P0
Local_Trusted_Corpus
aa7b8d9c-c971-439e-a1f7-bea4e3721ee6
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,338
supabase-export-v2
d0e0fea5f2d199ef
not, but should treat *pax* archives as if they were in the universally supported *ustar* format. It is the current default format for new archives. It extends the existing *ustar* format with extra headers for information that cannot be stored otherwise. There are two flavours of pax headers: Extended headers only a...
trusted_official_docs
CPython Docs
not, but should treat *pax* archives as if they were in the universally supported *ustar* format. It is the current default format for new archives. It extends the existing *ustar* format with extra headers for information that cannot be stored otherwise. There are two flavours of pax headers: Extended headers only a...
not, but should treat *pax* archives as if they were in the universally supported *ustar* format. It is the current default format for new archives. It extends the existing *ustar* format with extra headers for information that cannot be stored otherwise. There are two flavours of pax headers: Extended headers only a...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ab127ffe-8d19-440b-88a0-662fdf0a1ff4
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
46,925
supabase-export-v2
9ad63201625e8424
* read/write support for the POSIX.1-1988 (ustar) format. * read/write support for the GNU tar format including *longname* and *longlink* extensions, read-only support for all variants of the *sparse* extension including restoration of sparse files.
trusted_official_docs
CPython Docs
* read/write support for the POSIX.1-1988 (ustar) format. * read/write support for the GNU tar format including *longname* and *longlink* extensions, read-only support for all variants of the *sparse* extension including restoration of sparse files.
* read/write support for the POSIX.1-1988 (ustar) format. * read/write support for the GNU tar format including *longname* and *longlink* extensions, read-only support for all variants of the *sparse* extension including restoration of sparse files.
python, official-docs, cpython, P0
Local_Trusted_Corpus
af614849-8a57-430e-8b0b-7470cf6a5391
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,116
supabase-export-v2
157902f94ee67ca4
modifying. This is the case for objects such as :class:`~gzip.GzipFile`. The :attr:`~TarInfo.name` may also be modified, in which case *arcname* could be a dummy string. .. versionchanged:: 3.6 The *name* parameter accepts a :term:`path-like object`.
trusted_official_docs
CPython Docs
modifying. This is the case for objects such as :class:`~gzip.GzipFile`. The :attr:`~TarInfo.name` may also be modified, in which case *arcname* could be a dummy string. .. versionchanged:: 3.6 The *name* parameter accepts a :term:`path-like object`.
modifying. This is the case for objects such as :class:`~gzip.GzipFile`. The :attr:`~TarInfo.name` may also be modified, in which case *arcname* could be a dummy string. .. versionchanged:: 3.6 The *name* parameter accepts a :term:`path-like object`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b086aa50-23ca-40b9-9612-aef406adf531
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,040
supabase-export-v2
4a0b3a3b3c3cc2cf
The *tarinfo* argument can be used to replace the default :class:`TarInfo` class with a different one. If *dereference* is :const:`False`, add symbolic and hard links to the archive. If it is :const:`True`, add the content of the target files to the archive. This has no effect on systems that do not support symbolic ...
trusted_official_docs
CPython Docs
The *tarinfo* argument can be used to replace the default :class:`TarInfo` class with a different one. If *dereference* is :const:`False`, add symbolic and hard links to the archive. If it is :const:`True`, add the content of the target files to the archive. This has no effect on systems that do not support symbolic ...
The *tarinfo* argument can be used to replace the default :class:`TarInfo` class with a different one. If *dereference* is :const:`False`, add symbolic and hard links to the archive. If it is :const:`True`, add the content of the target files to the archive. This has no effect on systems that do not support symbolic ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b0ecbcf6-f44a-4e0a-826d-666fc6789144
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,277
supabase-export-v2
2c03f405b21ff15c
filters may be more complex objects with an internal state. It may be useful to write these as context managers, to be used like this:: with StatefulFilter() as filter_func: tar.extractall(path, filter=filter_func)
trusted_official_docs
CPython Docs
filters may be more complex objects with an internal state. It may be useful to write these as context managers, to be used like this:: with StatefulFilter() as filter_func: tar.extractall(path, filter=filter_func)
filters may be more complex objects with an internal state. It may be useful to write these as context managers, to be used like this:: with StatefulFilter() as filter_func: tar.extractall(path, filter=filter_func)
python, official-docs, cpython, P0
Local_Trusted_Corpus
b1215b18-a860-48a0-a6cc-8065e0c574e0
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,254
supabase-export-v2
f6f4f887b3cfb7ab
Filter errors ~~~~~~~~~~~~~ When a filter refuses to extract a file, it will raise an appropriate exception, a subclass of :class:`~tarfile.FilterError`. This will abort the extraction if :attr:`TarFile.errorlevel` is 1 or more. With ``errorlevel=0`` the error will be logged and the member will be skipped, but extracti...
trusted_official_docs
CPython Docs
Filter errors ~~~~~~~~~~~~~ When a filter refuses to extract a file, it will raise an appropriate exception, a subclass of :class:`~tarfile.FilterError`. This will abort the extraction if :attr:`TarFile.errorlevel` is 1 or more. With ``errorlevel=0`` the error will be logged and the member will be skipped, but extracti...
Filter errors ~~~~~~~~~~~~~ When a filter refuses to extract a file, it will raise an appropriate exception, a subclass of :class:`~tarfile.FilterError`. This will abort the extraction if :attr:`TarFile.errorlevel` is 1 or more. With ``errorlevel=0`` the error will be logged and the member will be skipped, but extracti...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b179353e-967f-4637-abf3-b56a7b04304d
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,225
supabase-export-v2
796303d9796e096e
The default filter is set to :func:`data <data_filter>`. Previously, the default was equivalent to :func:`fully_trusted <fully_trusted_filter>`. * A callable which will be called for each extracted member with a :ref:`TarInfo <tarinfo-objects>` describing the member and the destination path to where the archive is ex...
trusted_official_docs
CPython Docs
The default filter is set to :func:`data <data_filter>`. Previously, the default was equivalent to :func:`fully_trusted <fully_trusted_filter>`. * A callable which will be called for each extracted member with a :ref:`TarInfo <tarinfo-objects>` describing the member and the destination path to where the archive is ex...
The default filter is set to :func:`data <data_filter>`. Previously, the default was equivalent to :func:`fully_trusted <fully_trusted_filter>`. * A callable which will be called for each extracted member with a :ref:`TarInfo <tarinfo-objects>` describing the member and the destination path to where the archive is ex...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b309ae85-edd3-4853-949b-f0924e060a09
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,105
supabase-export-v2
fce60658b86b144f
which disallows some dangerous features such as links to absolute paths or paths outside of the destination. Previously, the default was equivalent to :func:`fully_trusted <fully_trusted_filter>`. .. method:: TarFile.add(name, arcname=None, recursive=True, *, filter=None)
trusted_official_docs
CPython Docs
which disallows some dangerous features such as links to absolute paths or paths outside of the destination. Previously, the default was equivalent to :func:`fully_trusted <fully_trusted_filter>`. .. method:: TarFile.add(name, arcname=None, recursive=True, *, filter=None)
which disallows some dangerous features such as links to absolute paths or paths outside of the destination. Previously, the default was equivalent to :func:`fully_trusted <fully_trusted_filter>`. .. method:: TarFile.add(name, arcname=None, recursive=True, *, filter=None)
python, official-docs, cpython, P0
Local_Trusted_Corpus
b5a8d4b9-7e47-4035-9aa7-e442c916f2ce
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,236
supabase-export-v2
f74775e2fd19da94
Implements the ``'tar'`` filter. - Strip leading slashes (``/`` and :data:`os.sep`) from filenames. - :ref:`Refuse <tarfile-extraction-refuse>` to extract files with absolute paths (in case the name is absolute even after stripping slashes, e.g. ``C:/foo`` on Windows). This raises :class:`~tarfile.AbsolutePathError`....
trusted_official_docs
CPython Docs
Implements the ``'tar'`` filter. - Strip leading slashes (``/`` and :data:`os.sep`) from filenames. - :ref:`Refuse <tarfile-extraction-refuse>` to extract files with absolute paths (in case the name is absolute even after stripping slashes, e.g. ``C:/foo`` on Windows). This raises :class:`~tarfile.AbsolutePathError`....
Implements the ``'tar'`` filter. - Strip leading slashes (``/`` and :data:`os.sep`) from filenames. - :ref:`Refuse <tarfile-extraction-refuse>` to extract files with absolute paths (in case the name is absolute even after stripping slashes, e.g. ``C:/foo`` on Windows). This raises :class:`~tarfile.AbsolutePathError`....
python, official-docs, cpython, P0
Local_Trusted_Corpus
bc58bd63-5be0-466a-84c5-83cbbba195c4
CPython Docs
file://datasets/cpython/Doc/library/tarfile.rst
unknown
01fad262-38a9-468a-9368-93abc6076b7e
47,247
supabase-export-v2
cabc86fde116a2e5
read and write permissions (:const:`~stat.S_IRUSR` | :const:`~stat.S_IWUSR`). - Remove the group & other executable permission (:const:`~stat.S_IXGRP` | :const:`~stat.S_IXOTH`) if the owner doesn’t have it (:const:`~stat.S_IXUSR`). - For other files (directories), set ``mode`` to ``None``, so that extraction methods s...
trusted_official_docs
CPython Docs
read and write permissions (:const:`~stat.S_IRUSR` | :const:`~stat.S_IWUSR`). - Remove the group & other executable permission (:const:`~stat.S_IXGRP` | :const:`~stat.S_IXOTH`) if the owner doesn’t have it (:const:`~stat.S_IXUSR`). - For other files (directories), set ``mode`` to ``None``, so that extraction methods s...
read and write permissions (:const:`~stat.S_IRUSR` | :const:`~stat.S_IWUSR`). - Remove the group & other executable permission (:const:`~stat.S_IXGRP` | :const:`~stat.S_IXOTH`) if the owner doesn’t have it (:const:`~stat.S_IXUSR`). - For other files (directories), set ``mode`` to ``None``, so that extraction methods s...
python, official-docs, cpython, P0
Local_Trusted_Corpus