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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f7304691-7d5c-42a1-95a2-2dc0e155445a | CPython Docs | file://datasets/cpython/Doc/library/collections.abc.rst | unknown | 13180889-19fc-45dc-ae98-c79d19297e43 | 38,424 | supabase-export-v2 | 451c101c931321e3 | .. tabularcolumns:: |l|L|L|L|
============================== ====================== ======================= ====================================================
ABC Inherits from Abstract Methods Mixin Methods
============================== ====================== ======================= ================================... | trusted_official_docs | CPython Docs | .. tabularcolumns:: |l|L|L|L|
============================== ====================== ======================= ====================================================
ABC Inherits from Abstract Methods Mixin Methods
============================== ====================== ======================= ================================... | .. tabularcolumns:: |l|L|L|L|
============================== ====================== ======================= ====================================================
ABC Inherits from Abstract Methods Mixin Methods
============================== ====================== ======================= ================================... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fa712063-e59a-4ec6-a185-26eafd40d7f4 | CPython Docs | file://datasets/cpython/Doc/library/collections.abc.rst | unknown | 13180889-19fc-45dc-ae98-c79d19297e43 | 38,507 | supabase-export-v2 | 23e6d529d1f1cf03 | (2) To override the comparisons (presumably for speed, as the semantics are fixed), redefine :meth:`~object.__le__` and :meth:`~object.__ge__`, then the other operations will automatically follow suit.
(3)
The :class:`Set` mixin provides a :meth:`!_hash` method to compute a hash value
for the set; however, :meth:`~ob... | trusted_official_docs | CPython Docs | (2) To override the comparisons (presumably for speed, as the semantics are fixed), redefine :meth:`~object.__le__` and :meth:`~object.__ge__`, then the other operations will automatically follow suit.
(3)
The :class:`Set` mixin provides a :meth:`!_hash` method to compute a hash value
for the set; however, :meth:`~ob... | (2) To override the comparisons (presumably for speed, as the semantics are fixed), redefine :meth:`~object.__le__` and :meth:`~object.__ge__`, then the other operations will automatically follow suit.
(3)
The :class:`Set` mixin provides a :meth:`!_hash` method to compute a hash value
for the set; however, :meth:`~ob... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fad37426-3aac-48d8-a13d-b28917d5f46c | CPython Docs | file://datasets/cpython/Doc/library/collections.abc.rst | unknown | 13180889-19fc-45dc-ae98-c79d19297e43 | 38,432 | supabase-export-v2 | 5f3e88326b7787f6 | :class:`MutableMapping` :class:`Mapping` ``__getitem__``, Inherited :class:`Mapping` methods and ``__setitem__``, ``pop``, ``popitem``, ``clear``, ``update``, ``__delitem__``, and ``setdefault`` ``__iter__``, ``__len__``
:class:`MappingView` :class:`Sized` ``__init__``, ``__len__`` and ``__repr__``
:class:`ItemsView` :... | trusted_official_docs | CPython Docs | :class:`MutableMapping` :class:`Mapping` ``__getitem__``, Inherited :class:`Mapping` methods and ``__setitem__``, ``pop``, ``popitem``, ``clear``, ``update``, ``__delitem__``, and ``setdefault`` ``__iter__``, ``__len__``
:class:`MappingView` :class:`Sized` ``__init__``, ``__len__`` and ``__repr__``
:class:`ItemsView` :... | :class:`MutableMapping` :class:`Mapping` ``__getitem__``, Inherited :class:`Mapping` methods and ``__setitem__``, ``pop``, ``popitem``, ``clear``, ``update``, ``__delitem__``, and ``setdefault`` ``__iter__``, ``__len__``
:class:`MappingView` :class:`Sized` ``__init__``, ``__len__`` and ``__repr__``
:class:`ItemsView` :... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fd4f4d72-b07a-4223-93e3-e34ac3467544 | CPython Docs | file://datasets/cpython/Doc/library/collections.abc.rst | unknown | 13180889-19fc-45dc-ae98-c79d19297e43 | 38,462 | supabase-export-v2 | ef377d76e1b7c2f7 | underlying method is linear (as it would be with a linked list), the mixins will have quadratic performance and will likely need to be overridden.
.. method:: index(value, start=0, stop=None) | trusted_official_docs | CPython Docs | underlying method is linear (as it would be with a linked list), the mixins will have quadratic performance and will likely need to be overridden.
.. method:: index(value, start=0, stop=None) | underlying method is linear (as it would be with a linked list), the mixins will have quadratic performance and will likely need to be overridden.
.. method:: index(value, start=0, stop=None) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
81734616-014a-4302-bb95-11b8d8f225b0 | CPython Docs | file://datasets/cpython/Doc/library/tabnanny.rst | unknown | 80b00f1c-1b2a-45ab-bb19-a1d81f6b3160 | 38,519 | supabase-export-v2 | 8547b0ab896e031f | .. function:: check(file_or_dir)
If *file_or_dir* is a directory and not a symbolic link, then recursively
descend the directory tree named by *file_or_dir*, checking all :file:`.py`
files along the way. If *file_or_dir* is an ordinary Python source file, it
is checked for whitespace related problems. The diagnostic... | trusted_official_docs | CPython Docs | .. function:: check(file_or_dir)
If *file_or_dir* is a directory and not a symbolic link, then recursively
descend the directory tree named by *file_or_dir*, checking all :file:`.py`
files along the way. If *file_or_dir* is an ordinary Python source file, it
is checked for whitespace related problems. The diagnostic... | .. function:: check(file_or_dir)
If *file_or_dir* is a directory and not a symbolic link, then recursively
descend the directory tree named by *file_or_dir*, checking all :file:`.py`
files along the way. If *file_or_dir* is an ordinary Python source file, it
is checked for whitespace related problems. The diagnostic... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b36cb80e-df21-4c95-b1b3-d238ea679562 | CPython Docs | file://datasets/cpython/Doc/library/tabnanny.rst | unknown | 80b00f1c-1b2a-45ab-bb19-a1d81f6b3160 | 38,523 | supabase-export-v2 | c628920a86c1ff9d | .. data:: filename_only
Flag indicating whether to print only the filenames of files containing
whitespace related problems. This is set to true by the ``-q`` option if called
as a script. | trusted_official_docs | CPython Docs | .. data:: filename_only
Flag indicating whether to print only the filenames of files containing
whitespace related problems. This is set to true by the ``-q`` option if called
as a script. | .. data:: filename_only
Flag indicating whether to print only the filenames of files containing
whitespace related problems. This is set to true by the ``-q`` option if called
as a script. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d1814b9b-1b35-435b-b07d-ad7c6217ce78 | CPython Docs | file://datasets/cpython/Doc/library/tabnanny.rst | unknown | 80b00f1c-1b2a-45ab-bb19-a1d81f6b3160 | 38,515 | supabase-export-v2 | bcf0a6b637891fd8 | --------------
For the time being this module is intended to be called as a script. However it
is possible to import it into an IDE and use the function :func:`check`
described below. | trusted_official_docs | CPython Docs | --------------
For the time being this module is intended to be called as a script. However it
is possible to import it into an IDE and use the function :func:`check`
described below. | --------------
For the time being this module is intended to be called as a script. However it
is possible to import it into an IDE and use the function :func:`check`
described below. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
02e4dc50-a25a-42a6-bf7e-f5757b5f5ce3 | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,551 | supabase-export-v2 | 8234dcfd98a50820 | .. method:: add_set_handler(typekey, handler)
Record *handler* as the function to call when an object of a type
matching *typekey* is passed to :meth:`set_content`. For the possible
values of *typekey*, see :meth:`set_content`. | trusted_official_docs | CPython Docs | .. method:: add_set_handler(typekey, handler)
Record *handler* as the function to call when an object of a type
matching *typekey* is passed to :meth:`set_content`. For the possible
values of *typekey*, see :meth:`set_content`. | .. method:: add_set_handler(typekey, handler)
Record *handler* as the function to call when an object of a type
matching *typekey* is passed to :meth:`set_content`. For the possible
values of *typekey*, see :meth:`set_content`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
03d8c70c-0751-482d-a842-c46174658ed0 | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,545 | supabase-export-v2 | 8be3068a37e0bdd4 | the handler, obtain the type of *obj* (``typ = type(obj)``), and look for the following keys in the registry, stopping with the first one found:
* the type itself (``typ``)
* the type's fully qualified name (``typ.__module__ + '.' +
typ.__qualname__``). * the type's :attr:`qualname <type.__qualname__>` (``typ.__qualn... | trusted_official_docs | CPython Docs | the handler, obtain the type of *obj* (``typ = type(obj)``), and look for the following keys in the registry, stopping with the first one found:
* the type itself (``typ``)
* the type's fully qualified name (``typ.__module__ + '.' +
typ.__qualname__``). * the type's :attr:`qualname <type.__qualname__>` (``typ.__qualn... | the handler, obtain the type of *obj* (``typ = type(obj)``), and look for the following keys in the registry, stopping with the first one found:
* the type itself (``typ``)
* the type's fully qualified name (``typ.__module__ + '.' +
typ.__qualname__``). * the type's :attr:`qualname <type.__qualname__>` (``typ.__qualn... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
03ec493a-5c8e-41e8-b4d6-65464ae35e86 | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,553 | supabase-export-v2 | 11d2c7681aae5e61 | Content Manager Instances ~~~~~~~~~~~~~~~~~~~~~~~~~
Currently the email package provides only one concrete content manager,
:data:`raw_data_manager`, although more may be added in the future. :data:`raw_data_manager` is the
:attr:`~email.policy.EmailPolicy.content_manager` provided by
:attr:`~email.policy.EmailPolicy` ... | trusted_official_docs | CPython Docs | Content Manager Instances ~~~~~~~~~~~~~~~~~~~~~~~~~
Currently the email package provides only one concrete content manager,
:data:`raw_data_manager`, although more may be added in the future. :data:`raw_data_manager` is the
:attr:`~email.policy.EmailPolicy.content_manager` provided by
:attr:`~email.policy.EmailPolicy` ... | Content Manager Instances ~~~~~~~~~~~~~~~~~~~~~~~~~
Currently the email package provides only one concrete content manager,
:data:`raw_data_manager`, although more may be added in the future. :data:`raw_data_manager` is the
:attr:`~email.policy.EmailPolicy.content_manager` provided by
:attr:`~email.policy.EmailPolicy` ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
148e13c7-e1cc-4ac7-b83f-daf9067ced92 | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,546 | supabase-export-v2 | e05c547f8610a5bd | itself (``typ``) * the type's fully qualified name (``typ.__module__ + '.' + typ.__qualname__``). * the type's :attr:`qualname <type.__qualname__>` (``typ.__qualname__``) * the type's :attr:`name <type.__name__>` (``typ.__name__``).
If none of the above match, repeat all of the checks above for each of
the types in th... | trusted_official_docs | CPython Docs | itself (``typ``) * the type's fully qualified name (``typ.__module__ + '.' + typ.__qualname__``). * the type's :attr:`qualname <type.__qualname__>` (``typ.__qualname__``) * the type's :attr:`name <type.__name__>` (``typ.__name__``).
If none of the above match, repeat all of the checks above for each of
the types in th... | itself (``typ``) * the type's fully qualified name (``typ.__module__ + '.' + typ.__qualname__``). * the type's :attr:`qualname <type.__qualname__>` (``typ.__qualname__``) * the type's :attr:`name <type.__name__>` (``typ.__name__``).
If none of the above match, repeat all of the checks above for each of
the types in th... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1c3c7776-a207-4a8b-b0e0-e0feac4d4101 | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,563 | supabase-export-v2 | 693a32c9f1dee1a6 | character set. The default is ``utf-8``. If the specified *charset* is a known alias for a standard MIME charset name, use the standard charset instead.
If *cte* is set, encode the payload using the specified content transfer
encoding, and set the :mailheader:`Content-Transfer-Encoding` header to
that value. Possible... | trusted_official_docs | CPython Docs | character set. The default is ``utf-8``. If the specified *charset* is a known alias for a standard MIME charset name, use the standard charset instead.
If *cte* is set, encode the payload using the specified content transfer
encoding, and set the :mailheader:`Content-Transfer-Encoding` header to
that value. Possible... | character set. The default is ``utf-8``. If the specified *charset* is a known alias for a standard MIME charset name, use the standard charset instead.
If *cte* is set, encode the payload using the specified content transfer
encoding, and set the :mailheader:`Content-Transfer-Encoding` header to
that value. Possible... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1cf33a86-9241-4e10-9232-c77059b7527b | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,559 | supabase-export-v2 | bfa2fd9733e0e568 | \ params=None, headers=None) set_content(msg, <'bytes'>, maintype, subtype, cte="base64", \ disposition=None, filename=None, cid=None, \ params=None, headers=None) set_content(msg, <'EmailMessage'>, cte=None, \ disposition=None, filename=None, cid=None, \ params=None, headers=None)
Add headers and payload to *msg*: | trusted_official_docs | CPython Docs | \ params=None, headers=None) set_content(msg, <'bytes'>, maintype, subtype, cte="base64", \ disposition=None, filename=None, cid=None, \ params=None, headers=None) set_content(msg, <'EmailMessage'>, cte=None, \ disposition=None, filename=None, cid=None, \ params=None, headers=None)
Add headers and payload to *msg*: | \ params=None, headers=None) set_content(msg, <'bytes'>, maintype, subtype, cte="base64", \ disposition=None, filename=None, cid=None, \ params=None, headers=None) set_content(msg, <'EmailMessage'>, cte=None, \ disposition=None, filename=None, cid=None, \ params=None, headers=None)
Add headers and payload to *msg*: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1f5019b5-b3d8-4206-a11b-6db385dfd1c4 | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,571 | supabase-export-v2 | 9168e116987df15f | If *params* is specified, iterate its ``items`` method and use the resulting ``(key, value)`` pairs to set additional parameters on the :mailheader:`Content-Type` header.
If *headers* is specified and is a list of strings of the form
``headername: headervalue`` or a list of ``header`` objects
(distinguished from stri... | trusted_official_docs | CPython Docs | If *params* is specified, iterate its ``items`` method and use the resulting ``(key, value)`` pairs to set additional parameters on the :mailheader:`Content-Type` header.
If *headers* is specified and is a list of strings of the form
``headername: headervalue`` or a list of ``header`` objects
(distinguished from stri... | If *params* is specified, iterate its ``items`` method and use the resulting ``(key, value)`` pairs to set additional parameters on the :mailheader:`Content-Type` header.
If *headers* is specified and is a list of strings of the form
``headername: headervalue`` or a list of ``header`` objects
(distinguished from stri... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
24680bd0-47f8-4363-bf75-71d62483ecde | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,536 | supabase-export-v2 | eccb7af4e3493b3f | .. class:: ContentManager()
Base class for content managers. Provides the standard registry mechanisms
to register converters between MIME content and other representations, as
well as the ``get_content`` and ``set_content`` dispatch methods. | trusted_official_docs | CPython Docs | .. class:: ContentManager()
Base class for content managers. Provides the standard registry mechanisms
to register converters between MIME content and other representations, as
well as the ``get_content`` and ``set_content`` dispatch methods. | .. class:: ContentManager()
Base class for content managers. Provides the standard registry mechanisms
to register converters between MIME content and other representations, as
well as the ``get_content`` and ``set_content`` dispatch methods. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
49ac5b60-f421-4452-bd44-bb04cd973835 | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,564 | supabase-export-v2 | 4fdb89628f08509a | input cannot be encoded in the specified encoding (for example, specifying a *cte* of ``7bit`` for an input that contains non-ASCII values), raise a :exc:`ValueError`.
* For ``str`` objects, if *cte* is not set use heuristics to
determine the most compact encoding. Prior to encoding,
:meth:`str.splitlines` is used to... | trusted_official_docs | CPython Docs | input cannot be encoded in the specified encoding (for example, specifying a *cte* of ``7bit`` for an input that contains non-ASCII values), raise a :exc:`ValueError`.
* For ``str`` objects, if *cte* is not set use heuristics to
determine the most compact encoding. Prior to encoding,
:meth:`str.splitlines` is used to... | input cannot be encoded in the specified encoding (for example, specifying a *cte* of ``7bit`` for an input that contains non-ASCII values), raise a :exc:`ValueError`.
* For ``str`` objects, if *cte* is not set use heuristics to
determine the most compact encoding. Prior to encoding,
:meth:`str.splitlines` is used to... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
51c735e5-88cb-4827-be3f-a1b28b04a1f4 | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,541 | supabase-export-v2 | 96d914f55944a30d | * the string representing the full MIME type (``maintype/subtype``) * the string representing the ``maintype`` * the empty string
If none of these keys produce a handler, raise a :exc:`KeyError` for the
full MIME type. | trusted_official_docs | CPython Docs | * the string representing the full MIME type (``maintype/subtype``) * the string representing the ``maintype`` * the empty string
If none of these keys produce a handler, raise a :exc:`KeyError` for the
full MIME type. | * the string representing the full MIME type (``maintype/subtype``) * the string representing the ``maintype`` * the empty string
If none of these keys produce a handler, raise a :exc:`KeyError` for the
full MIME type. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
51fb24b7-e6f3-4d76-b7d1-e4492259bab9 | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,547 | supabase-export-v2 | eba4e8c263c18a5f | for a handler for the key ``None``. If there is no handler for ``None``, raise a :exc:`KeyError` for the fully qualified name of the type.
Also add a :mailheader:`MIME-Version` header if one is not present (see
also :class:`.MIMEPart`). | trusted_official_docs | CPython Docs | for a handler for the key ``None``. If there is no handler for ``None``, raise a :exc:`KeyError` for the fully qualified name of the type.
Also add a :mailheader:`MIME-Version` header if one is not present (see
also :class:`.MIMEPart`). | for a handler for the key ``None``. If there is no handler for ``None``, raise a :exc:`KeyError` for the fully qualified name of the type.
Also add a :mailheader:`MIME-Version` header if one is not present (see
also :class:`.MIMEPart`). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5552c224-47ba-4492-9a97-3d756ee7ef26 | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,570 | supabase-export-v2 | 98768c7271554ad7 | If *cid* is specified, add a :mailheader:`Content-ID` header with *cid* as its value.
If *params* is specified, iterate its ``items`` method and use the
resulting ``(key, value)`` pairs to set additional parameters on the
:mailheader:`Content-Type` header. | trusted_official_docs | CPython Docs | If *cid* is specified, add a :mailheader:`Content-ID` header with *cid* as its value.
If *params* is specified, iterate its ``items`` method and use the
resulting ``(key, value)`` pairs to set additional parameters on the
:mailheader:`Content-Type` header. | If *cid* is specified, add a :mailheader:`Content-ID` header with *cid* as its value.
If *params* is specified, iterate its ``items`` method and use the
resulting ``(key, value)`` pairs to set additional parameters on the
:mailheader:`Content-Type` header. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
57f41cf0-7a15-427a-a296-c4040f323bbe | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,538 | supabase-export-v2 | c99cf53c41f9d191 | .. method:: get_content(msg, *args, **kw)
Look up a handler function based on the ``mimetype`` of *msg* (see next
paragraph), call it, passing through all arguments, and return the result
of the call. The expectation is that the handler will extract the
payload from *msg* and return an object that encodes informatio... | trusted_official_docs | CPython Docs | .. method:: get_content(msg, *args, **kw)
Look up a handler function based on the ``mimetype`` of *msg* (see next
paragraph), call it, passing through all arguments, and return the result
of the call. The expectation is that the handler will extract the
payload from *msg* and return an object that encodes informatio... | .. method:: get_content(msg, *args, **kw)
Look up a handler function based on the ``mimetype`` of *msg* (see next
paragraph), call it, passing through all arguments, and return the result
of the call. The expectation is that the handler will extract the
payload from *msg* and return an object that encodes informatio... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
65acb247-14b7-429e-8ef6-ba852e5f16a2 | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,540 | supabase-export-v2 | 0243ee3fef8cc9e7 | To find the handler, look for the following keys in the registry, stopping with the first one found:
* the string representing the full MIME type (``maintype/subtype``)
* the string representing the ``maintype``
* the empty string | trusted_official_docs | CPython Docs | To find the handler, look for the following keys in the registry, stopping with the first one found:
* the string representing the full MIME type (``maintype/subtype``)
* the string representing the ``maintype``
* the empty string | To find the handler, look for the following keys in the registry, stopping with the first one found:
* the string representing the full MIME type (``maintype/subtype``)
* the string representing the ``maintype``
* the empty string | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6f855717-a0b5-4d16-911a-137383e846ee | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,543 | supabase-export-v2 | 0ecee076fca5eb16 | .. method:: set_content(msg, obj, *args, **kw)
If the ``maintype`` is ``multipart``, raise a :exc:`TypeError`; otherwise
look up a handler function based on the type of *obj* (see next
paragraph), call :meth:`~email.message.EmailMessage.clear_content` on the
*msg*, and call the handler function, passing through all ... | trusted_official_docs | CPython Docs | .. method:: set_content(msg, obj, *args, **kw)
If the ``maintype`` is ``multipart``, raise a :exc:`TypeError`; otherwise
look up a handler function based on the type of *obj* (see next
paragraph), call :meth:`~email.message.EmailMessage.clear_content` on the
*msg*, and call the handler function, passing through all ... | .. method:: set_content(msg, obj, *args, **kw)
If the ``maintype`` is ``multipart``, raise a :exc:`TypeError`; otherwise
look up a handler function based on the type of *obj* (see next
paragraph), call :meth:`~email.message.EmailMessage.clear_content` on the
*msg*, and call the handler function, passing through all ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
71a1a5b8-ba54-4607-a027-3a15c9fff0d8 | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,537 | supabase-export-v2 | 9b9ea32c5f0fa1e3 | content managers. Provides the standard registry mechanisms to register converters between MIME content and other representations, as well as the ``get_content`` and ``set_content`` dispatch methods.
.. method:: get_content(msg, *args, **kw) | trusted_official_docs | CPython Docs | content managers. Provides the standard registry mechanisms to register converters between MIME content and other representations, as well as the ``get_content`` and ``set_content`` dispatch methods.
.. method:: get_content(msg, *args, **kw) | content managers. Provides the standard registry mechanisms to register converters between MIME content and other representations, as well as the ``get_content`` and ``set_content`` dispatch methods.
.. method:: get_content(msg, *args, **kw) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7a2840da-2162-4326-8d9d-6965330546ba | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,565 | supabase-export-v2 | ea2658f7c4631550 | ``base64`` is requested for *subtype* ``rfc822``, and for any *cte* other than ``7bit`` for *subtype* ``external-body``. For ``message/rfc822``, use ``8bit`` if *cte* is not specified.
For
all other values of *subtype*, use ``7bit``. | trusted_official_docs | CPython Docs | ``base64`` is requested for *subtype* ``rfc822``, and for any *cte* other than ``7bit`` for *subtype* ``external-body``. For ``message/rfc822``, use ``8bit`` if *cte* is not specified.
For
all other values of *subtype*, use ``7bit``. | ``base64`` is requested for *subtype* ``rfc822``, and for any *cte* other than ``7bit`` for *subtype* ``external-body``. For ``message/rfc822``, use ``8bit`` if *cte* is not specified.
For
all other values of *subtype*, use ``7bit``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7b6b927e-2e98-4b52-adb9-e03e2a9cd52d | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,566 | supabase-export-v2 | 40a24fbb9c718739 | For all other values of *subtype*, use ``7bit``.
.. note:: A *cte* of ``binary`` does not actually work correctly yet. The ``EmailMessage`` object as modified by ``set_content`` is
correct, but :class:`~email.generator.BytesGenerator` does not
serialize it correctly. | trusted_official_docs | CPython Docs | For all other values of *subtype*, use ``7bit``.
.. note:: A *cte* of ``binary`` does not actually work correctly yet. The ``EmailMessage`` object as modified by ``set_content`` is
correct, but :class:`~email.generator.BytesGenerator` does not
serialize it correctly. | For all other values of *subtype*, use ``7bit``.
.. note:: A *cte* of ``binary`` does not actually work correctly yet. The ``EmailMessage`` object as modified by ``set_content`` is
correct, but :class:`~email.generator.BytesGenerator` does not
serialize it correctly. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8936ac3a-431f-4536-a755-913909de9eae | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,567 | supabase-export-v2 | dc91dd51234491ce | *cte* of ``binary`` does not actually work correctly yet. The ``EmailMessage`` object as modified by ``set_content`` is correct, but :class:`~email.generator.BytesGenerator` does not serialize it correctly.
If *disposition* is set, use it as the value of the
:mailheader:`Content-Disposition` header. If not specified, ... | trusted_official_docs | CPython Docs | *cte* of ``binary`` does not actually work correctly yet. The ``EmailMessage`` object as modified by ``set_content`` is correct, but :class:`~email.generator.BytesGenerator` does not serialize it correctly.
If *disposition* is set, use it as the value of the
:mailheader:`Content-Disposition` header. If not specified, ... | *cte* of ``binary`` does not actually work correctly yet. The ``EmailMessage`` object as modified by ``set_content`` is correct, but :class:`~email.generator.BytesGenerator` does not serialize it correctly.
If *disposition* is set, use it as the value of the
:mailheader:`Content-Disposition` header. If not specified, ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
89b578da-198f-4a78-aca3-333069af9c7c | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,569 | supabase-export-v2 | 753a8e9cbc36ca13 | If *filename* is specified, use it as the value of the ``filename`` parameter of the :mailheader:`Content-Disposition` header.
If *cid* is specified, add a :mailheader:`Content-ID` header with
*cid* as its value. | trusted_official_docs | CPython Docs | If *filename* is specified, use it as the value of the ``filename`` parameter of the :mailheader:`Content-Disposition` header.
If *cid* is specified, add a :mailheader:`Content-ID` header with
*cid* as its value. | If *filename* is specified, use it as the value of the ``filename`` parameter of the :mailheader:`Content-Disposition` header.
If *cid* is specified, add a :mailheader:`Content-ID` header with
*cid* as its value. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9107f1f7-3265-496f-9845-b223997f6d2f | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,555 | supabase-export-v2 | cf0859046fc3bcd6 | .. data:: raw_data_manager
This content manager provides only a minimum interface beyond that provided
by :class:`~email.message.Message` itself: it deals only with text, raw
byte strings, and :class:`~email.message.Message` objects. Nevertheless, it
provides significant advantages compared to the base API: ``get_co... | trusted_official_docs | CPython Docs | .. data:: raw_data_manager
This content manager provides only a minimum interface beyond that provided
by :class:`~email.message.Message` itself: it deals only with text, raw
byte strings, and :class:`~email.message.Message` objects. Nevertheless, it
provides significant advantages compared to the base API: ``get_co... | .. data:: raw_data_manager
This content manager provides only a minimum interface beyond that provided
by :class:`~email.message.Message` itself: it deals only with text, raw
byte strings, and :class:`~email.message.Message` objects. Nevertheless, it
provides significant advantages compared to the base API: ``get_co... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9d213313-2a2e-4e12-ae0f-c48197547f02 | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,568 | supabase-export-v2 | b1b1b4c0d0953296 | *disposition* is not specified and *filename* is also not specified, do not add the header. The only valid values for *disposition* are ``attachment`` and ``inline``.
If *filename* is specified, use it as the value of the ``filename``
parameter of the :mailheader:`Content-Disposition` header. | trusted_official_docs | CPython Docs | *disposition* is not specified and *filename* is also not specified, do not add the header. The only valid values for *disposition* are ``attachment`` and ``inline``.
If *filename* is specified, use it as the value of the ``filename``
parameter of the :mailheader:`Content-Disposition` header. | *disposition* is not specified and *filename* is also not specified, do not add the header. The only valid values for *disposition* are ``attachment`` and ``inline``.
If *filename* is specified, use it as the value of the ``filename``
parameter of the :mailheader:`Content-Disposition` header. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9ed5e922-b8e0-4189-9f11-5d6bd63f0bed | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,561 | supabase-export-v2 | 4ee7e94b0afb5a14 | Add a :mailheader:`Content-Type` header with a ``maintype/subtype`` value.
* For ``str``, set the MIME ``maintype`` to ``text``, and set the
subtype to *subtype* if it is specified, or ``plain`` if it is not. * For ``bytes``, use the specified *maintype* and *subtype*, or
raise a :exc:`TypeError` if they are not spec... | trusted_official_docs | CPython Docs | Add a :mailheader:`Content-Type` header with a ``maintype/subtype`` value.
* For ``str``, set the MIME ``maintype`` to ``text``, and set the
subtype to *subtype* if it is specified, or ``plain`` if it is not. * For ``bytes``, use the specified *maintype* and *subtype*, or
raise a :exc:`TypeError` if they are not spec... | Add a :mailheader:`Content-Type` header with a ``maintype/subtype`` value.
* For ``str``, set the MIME ``maintype`` to ``text``, and set the
subtype to *subtype* if it is specified, or ``plain`` if it is not. * For ``bytes``, use the specified *maintype* and *subtype*, or
raise a :exc:`TypeError` if they are not spec... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a7e43583-e660-4f84-8624-38d18d6ef9cf | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,557 | supabase-export-v2 | f71aba97a79708ea | .. method:: get_content(msg, errors='replace')
Return the payload of the part as either a string (for ``text`` parts), an
:class:`~email.message.EmailMessage` object (for ``message/rfc822``
parts), or a ``bytes`` object (for all other non-multipart types). Raise
a :exc:`KeyError` if called on a ``multipart``. If the... | trusted_official_docs | CPython Docs | .. method:: get_content(msg, errors='replace')
Return the payload of the part as either a string (for ``text`` parts), an
:class:`~email.message.EmailMessage` object (for ``message/rfc822``
parts), or a ``bytes`` object (for all other non-multipart types). Raise
a :exc:`KeyError` if called on a ``multipart``. If the... | .. method:: get_content(msg, errors='replace')
Return the payload of the part as either a string (for ``text`` parts), an
:class:`~email.message.EmailMessage` object (for ``message/rfc822``
parts), or a ``bytes`` object (for all other non-multipart types). Raise
a :exc:`KeyError` if called on a ``multipart``. If the... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bb14e7f8-1ef9-4415-8d2f-bb3a5d37933f | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,562 | supabase-export-v2 | d7111c2356c37dd4 | it is specified or ``rfc822`` if it is not. If *subtype* is ``partial``, raise an error (``bytes`` objects must be used to construct ``message/partial`` parts).
If *charset* is provided (which is valid only for ``str``), encode the
string to bytes using the specified character set. The default is
``utf-8``. If the sp... | trusted_official_docs | CPython Docs | it is specified or ``rfc822`` if it is not. If *subtype* is ``partial``, raise an error (``bytes`` objects must be used to construct ``message/partial`` parts).
If *charset* is provided (which is valid only for ``str``), encode the
string to bytes using the specified character set. The default is
``utf-8``. If the sp... | it is specified or ``rfc822`` if it is not. If *subtype* is ``partial``, raise an error (``bytes`` objects must be used to construct ``message/partial`` parts).
If *charset* is provided (which is valid only for ``str``), encode the
string to bytes using the specified character set. The default is
``utf-8``. If the sp... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bfe4b158-8734-47bc-8735-11fa36e26b42 | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,558 | supabase-export-v2 | 5577fafd160732f5 | a ``text`` part and *errors* is specified, use it as the error handler when decoding the payload to unicode. The default error handler is ``replace``.
.. method:: set_content(msg, <'str'>, subtype="plain", charset='utf-8', \
cte=None, \
disposition=None, filename=None, cid=None, \
params=None, headers=None)
set_con... | trusted_official_docs | CPython Docs | a ``text`` part and *errors* is specified, use it as the error handler when decoding the payload to unicode. The default error handler is ``replace``.
.. method:: set_content(msg, <'str'>, subtype="plain", charset='utf-8', \
cte=None, \
disposition=None, filename=None, cid=None, \
params=None, headers=None)
set_con... | a ``text`` part and *errors* is specified, use it as the error handler when decoding the payload to unicode. The default error handler is ``replace``.
.. method:: set_content(msg, <'str'>, subtype="plain", charset='utf-8', \
cte=None, \
disposition=None, filename=None, cid=None, \
params=None, headers=None)
set_con... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d142c03c-cc0e-49b6-a05b-dc7d0298b321 | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,539 | supabase-export-v2 | a1c59273e6bb223b | the call. The expectation is that the handler will extract the payload from *msg* and return an object that encodes information about the extracted data.
To find the handler, look for the following keys in the registry,
stopping with the first one found: | trusted_official_docs | CPython Docs | the call. The expectation is that the handler will extract the payload from *msg* and return an object that encodes information about the extracted data.
To find the handler, look for the following keys in the registry,
stopping with the first one found: | the call. The expectation is that the handler will extract the payload from *msg* and return an object that encodes information about the extracted data.
To find the handler, look for the following keys in the registry,
stopping with the first one found: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f1515927-3e40-4c1f-a760-7b352d7476b6 | CPython Docs | file://datasets/cpython/Doc/library/email.contentmanager.rst | unknown | 87d04cb7-54c2-42dd-9ae2-b51c8fd1894e | 38,544 | supabase-export-v2 | 3560e67424adcfe9 | into *msg*, possibly making other changes to *msg* as well, such as adding various MIME headers to encode information needed to interpret the stored data.
To find the handler, obtain the type of *obj* (``typ = type(obj)``), and
look for the following keys in the registry, stopping with the first one
found: | trusted_official_docs | CPython Docs | into *msg*, possibly making other changes to *msg* as well, such as adding various MIME headers to encode information needed to interpret the stored data.
To find the handler, obtain the type of *obj* (``typ = type(obj)``), and
look for the following keys in the registry, stopping with the first one
found: | into *msg*, possibly making other changes to *msg* as well, such as adding various MIME headers to encode information needed to interpret the stored data.
To find the handler, obtain the type of *obj* (``typ = type(obj)``), and
look for the following keys in the registry, stopping with the first one
found: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
068099e3-a837-4034-8f00-65ecde84dcc7 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,633 | supabase-export-v2 | 5e94f4218cee98d8 | .. function:: set_auto_history(enabled)
Enable or disable automatic calls to :c:func:`!add_history` when reading
input via readline. The *enabled* argument should be a Boolean value
that when true, enables auto history, and that when false, disables
auto history. | trusted_official_docs | CPython Docs | .. function:: set_auto_history(enabled)
Enable or disable automatic calls to :c:func:`!add_history` when reading
input via readline. The *enabled* argument should be a Boolean value
that when true, enables auto history, and that when false, disables
auto history. | .. function:: set_auto_history(enabled)
Enable or disable automatic calls to :c:func:`!add_history` when reading
input via readline. The *enabled* argument should be a Boolean value
that when true, enables auto history, and that when false, disables
auto history. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0f5724c7-eadf-4b93-81d5-5f9dcb255437 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,611 | supabase-export-v2 | 3d7131aa0cd229a5 | is :file:`~/.history`. This calls :c:func:`!write_history` in the underlying library and raises an :ref:`auditing event <auditing>` ``open`` with the file name if given and :code:`"~/.history"` otherwise.
.. versionchanged:: 3.14
The auditing event was added. | trusted_official_docs | CPython Docs | is :file:`~/.history`. This calls :c:func:`!write_history` in the underlying library and raises an :ref:`auditing event <auditing>` ``open`` with the file name if given and :code:`"~/.history"` otherwise.
.. versionchanged:: 3.14
The auditing event was added. | is :file:`~/.history`. This calls :c:func:`!write_history` in the underlying library and raises an :ref:`auditing event <auditing>` ``open`` with the file name if given and :code:`"~/.history"` otherwise.
.. versionchanged:: 3.14
The auditing event was added. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
10c7b1d8-9ac8-4ce2-8362-58eb6cbfd3a7 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,642 | supabase-export-v2 | d22b187b31ef9542 | .. function:: get_pre_input_hook()
Get the current pre-input hook function, or ``None`` if no pre-input hook
function has been set. This function only exists if Python was compiled
for a version of the library that supports it. | trusted_official_docs | CPython Docs | .. function:: get_pre_input_hook()
Get the current pre-input hook function, or ``None`` if no pre-input hook
function has been set. This function only exists if Python was compiled
for a version of the library that supports it. | .. function:: get_pre_input_hook()
Get the current pre-input hook function, or ``None`` if no pre-input hook
function has been set. This function only exists if Python was compiled
for a version of the library that supports it. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
17490586-1bed-4d0b-9e9e-f82d2f64e6f2 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,659 | supabase-export-v2 | f9f5b39de30e1e4e | Example -------
The following example demonstrates how to use the :mod:`!readline` module's
history reading and writing functions to automatically load and save a history
file named :file:`.python_history` from the user's home directory. The code
below would normally be executed automatically during interactive session... | trusted_official_docs | CPython Docs | Example -------
The following example demonstrates how to use the :mod:`!readline` module's
history reading and writing functions to automatically load and save a history
file named :file:`.python_history` from the user's home directory. The code
below would normally be executed automatically during interactive session... | Example -------
The following example demonstrates how to use the :mod:`!readline` module's
history reading and writing functions to automatically load and save a history
file named :file:`.python_history` from the user's home directory. The code
below would normally be executed automatically during interactive session... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
22523eb8-6b0d-47c3-a279-eeec402cbb6c | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,623 | supabase-export-v2 | 777a9d47e8c9c931 | .. function:: get_current_history_length()
Return the number of items currently in the history. (This is different from
:func:`get_history_length`, which returns the maximum number of lines that will
be written to a history file.) | trusted_official_docs | CPython Docs | .. function:: get_current_history_length()
Return the number of items currently in the history. (This is different from
:func:`get_history_length`, which returns the maximum number of lines that will
be written to a history file.) | .. function:: get_current_history_length()
Return the number of items currently in the history. (This is different from
:func:`get_history_length`, which returns the maximum number of lines that will
be written to a history file.) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
264b2ea7-5299-40f0-a6ff-3b54f11173df | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,657 | supabase-export-v2 | f86aac344b673c99 | .. function:: set_completion_display_matches_hook([function])
Set or remove the completion display function. If *function* is
specified, it will be used as the new completion display function;
if omitted or ``None``, any completion display function already
installed is removed. This sets or clears the
:c:data:`!rl_... | trusted_official_docs | CPython Docs | .. function:: set_completion_display_matches_hook([function])
Set or remove the completion display function. If *function* is
specified, it will be used as the new completion display function;
if omitted or ``None``, any completion display function already
installed is removed. This sets or clears the
:c:data:`!rl_... | .. function:: set_completion_display_matches_hook([function])
Set or remove the completion display function. If *function* is
specified, it will be used as the new completion display function;
if omitted or ``None``, any completion display function already
installed is removed. This sets or clears the
:c:data:`!rl_... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2a7e0953-c173-444f-a66e-87216460bde7 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,583 | supabase-export-v2 | 60aeeb1d5e513bb8 | be implemented by the ``editline`` (``libedit``) library instead of GNU readline. On macOS the :mod:`!readline` module detects which library is being used at run time.
The configuration file for ``editline`` is different from that
of GNU readline. If you programmatically load configuration strings
you can use :data:`... | trusted_official_docs | CPython Docs | be implemented by the ``editline`` (``libedit``) library instead of GNU readline. On macOS the :mod:`!readline` module detects which library is being used at run time.
The configuration file for ``editline`` is different from that
of GNU readline. If you programmatically load configuration strings
you can use :data:`... | be implemented by the ``editline`` (``libedit``) library instead of GNU readline. On macOS the :mod:`!readline` module detects which library is being used at run time.
The configuration file for ``editline`` is different from that
of GNU readline. If you programmatically load configuration strings
you can use :data:`... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
310ae5c0-3519-405a-8d8e-bf94c73e4a81 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,638 | supabase-export-v2 | 06dd54b5e2e40f84 | .. function:: set_startup_hook([function])
Set or remove the function invoked by the :c:data:`!rl_startup_hook`
callback of the underlying library. If *function* is specified, it will
be used as the new hook function; if omitted or ``None``, any function
already installed is removed. The hook is called with no
argu... | trusted_official_docs | CPython Docs | .. function:: set_startup_hook([function])
Set or remove the function invoked by the :c:data:`!rl_startup_hook`
callback of the underlying library. If *function* is specified, it will
be used as the new hook function; if omitted or ``None``, any function
already installed is removed. The hook is called with no
argu... | .. function:: set_startup_hook([function])
Set or remove the function invoked by the :c:data:`!rl_startup_hook`
callback of the underlying library. If *function* is specified, it will
be used as the new hook function; if omitted or ``None``, any function
already installed is removed. The hook is called with no
argu... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
39f8ed34-a7c2-40b1-84bc-8cbebe15c5bd | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,640 | supabase-export-v2 | cd6dfc69f21854e5 | .. function:: set_pre_input_hook([function])
Set or remove the function invoked by the :c:data:`!rl_pre_input_hook`
callback of the underlying library. If *function* is specified, it will
be used as the new hook function; if omitted or ``None``, any
function already installed is removed. The hook is called
with no ... | trusted_official_docs | CPython Docs | .. function:: set_pre_input_hook([function])
Set or remove the function invoked by the :c:data:`!rl_pre_input_hook`
callback of the underlying library. If *function* is specified, it will
be used as the new hook function; if omitted or ``None``, any
function already installed is removed. The hook is called
with no ... | .. function:: set_pre_input_hook([function])
Set or remove the function invoked by the :c:data:`!rl_pre_input_hook`
callback of the underlying library. If *function* is specified, it will
be used as the new hook function; if omitted or ``None``, any
function already installed is removed. The hook is called
with no ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
45a543be-d7a6-4e76-98c6-aad3e2647b38 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,595 | supabase-export-v2 | c4b7c2b2191cf15a | underlying library. It raises an :ref:`auditing event <auditing>` ``open`` with the file name if given, and :code:`"<readline_init_file>"` otherwise, regardless of which file the library resolves.
.. versionchanged:: 3.14
The auditing event was added. | trusted_official_docs | CPython Docs | underlying library. It raises an :ref:`auditing event <auditing>` ``open`` with the file name if given, and :code:`"<readline_init_file>"` otherwise, regardless of which file the library resolves.
.. versionchanged:: 3.14
The auditing event was added. | underlying library. It raises an :ref:`auditing event <auditing>` ``open`` with the file name if given, and :code:`"<readline_init_file>"` otherwise, regardless of which file the library resolves.
.. versionchanged:: 3.14
The auditing event was added. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
51a5bbdb-1265-4f19-bd3b-752c1418be73 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,578 | supabase-export-v2 | d1cbb5e94978c78f | interactive prompt. Settings made using this module affect the behaviour of both the interpreter's interactive prompt and the prompts offered by the built-in :func:`input` function.
Readline keybindings may be configured via an initialization file, typically
``.inputrc`` in your home directory. See `Readline Init File
... | trusted_official_docs | CPython Docs | interactive prompt. Settings made using this module affect the behaviour of both the interpreter's interactive prompt and the prompts offered by the built-in :func:`input` function.
Readline keybindings may be configured via an initialization file, typically
``.inputrc`` in your home directory. See `Readline Init File
... | interactive prompt. Settings made using this module affect the behaviour of both the interpreter's interactive prompt and the prompts offered by the built-in :func:`input` function.
Readline keybindings may be configured via an initialization file, typically
``.inputrc`` in your home directory. See `Readline Init File
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5ef20227-2a5b-4af6-b210-0e21e1aab6b3 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,644 | supabase-export-v2 | b62555e2724f84de | Completion ----------
The following functions relate to implementing a custom word completion
function. This is typically operated by the Tab key, and can suggest and
automatically complete a word being typed. By default, Readline is set up
to be used by :mod:`rlcompleter` to complete Python identifiers for
the interac... | trusted_official_docs | CPython Docs | Completion ----------
The following functions relate to implementing a custom word completion
function. This is typically operated by the Tab key, and can suggest and
automatically complete a word being typed. By default, Readline is set up
to be used by :mod:`rlcompleter` to complete Python identifiers for
the interac... | Completion ----------
The following functions relate to implementing a custom word completion
function. This is typically operated by the Tab key, and can suggest and
automatically complete a word being typed. By default, Readline is set up
to be used by :mod:`rlcompleter` to complete Python identifiers for
the interac... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7b419ae5-0a8e-4a98-bed8-73100b8921a4 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,660 | supabase-export-v2 | 74c0c9f3e6ffbf4c | file named :file:`.python_history` from the user's home directory. The code below would normally be executed automatically during interactive sessions from the user's :envvar:`PYTHONSTARTUP` file. ::
import atexit
import os
import readline | trusted_official_docs | CPython Docs | file named :file:`.python_history` from the user's home directory. The code below would normally be executed automatically during interactive sessions from the user's :envvar:`PYTHONSTARTUP` file. ::
import atexit
import os
import readline | file named :file:`.python_history` from the user's home directory. The code below would normally be executed automatically during interactive sessions from the user's :envvar:`PYTHONSTARTUP` file. ::
import atexit
import os
import readline | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7e2c1ef6-db4e-4f7f-b26f-c7a55704bec8 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,646 | supabase-export-v2 | b265fcb6f133fb7c | .. function:: set_completer([function])
Set or remove the completer function. If *function* is specified, it will be
used as the new completer function; if omitted or ``None``, any completer
function already installed is removed. The completer function is called as
``function(text, state)``, for *state* in ``0``, ``... | trusted_official_docs | CPython Docs | .. function:: set_completer([function])
Set or remove the completer function. If *function* is specified, it will be
used as the new completer function; if omitted or ``None``, any completer
function already installed is removed. The completer function is called as
``function(text, state)``, for *state* in ``0``, ``... | .. function:: set_completer([function])
Set or remove the completer function. If *function* is specified, it will be
used as the new completer function; if omitted or ``None``, any completer
function already installed is removed. The completer function is called as
``function(text, state)``, for *state* in ``0``, ``... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
86f67485-5d00-401e-a3ea-d2443bb79645 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,608 | supabase-export-v2 | 4b6e75096c217365 | is :file:`~/.history`. This calls :c:func:`!read_history` in the underlying library and raises an :ref:`auditing event <auditing>` ``open`` with the file name if given and :code:`"~/.history"` otherwise.
.. versionchanged:: 3.14
The auditing event was added. | trusted_official_docs | CPython Docs | is :file:`~/.history`. This calls :c:func:`!read_history` in the underlying library and raises an :ref:`auditing event <auditing>` ``open`` with the file name if given and :code:`"~/.history"` otherwise.
.. versionchanged:: 3.14
The auditing event was added. | is :file:`~/.history`. This calls :c:func:`!read_history` in the underlying library and raises an :ref:`auditing event <auditing>` ``open`` with the file name if given and :code:`"~/.history"` otherwise.
.. versionchanged:: 3.14
The auditing event was added. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8c5300c7-4263-4666-b301-3b96c7310fd3 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,582 | supabase-export-v2 | 6d64b626845aff9b | .. note::
The underlying Readline library API may be implemented by
the ``editline`` (``libedit``) library instead of GNU readline. On macOS the :mod:`!readline` module detects which library is being used
at run time. | trusted_official_docs | CPython Docs | .. note::
The underlying Readline library API may be implemented by
the ``editline`` (``libedit``) library instead of GNU readline. On macOS the :mod:`!readline` module detects which library is being used
at run time. | .. note::
The underlying Readline library API may be implemented by
the ``editline`` (``libedit``) library instead of GNU readline. On macOS the :mod:`!readline` module detects which library is being used
at run time. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8c632d1b-20e2-4acc-93c4-8e9c6f95a710 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,585 | supabase-export-v2 | a6de07515e3c1147 | initialization file located in your home directory is named ``.editrc``. For example, the following content in ``~/.editrc`` will turn ON *vi* keybindings and TAB completion::
python:bind -v
python:bind ^I rl_complete | trusted_official_docs | CPython Docs | initialization file located in your home directory is named ``.editrc``. For example, the following content in ``~/.editrc`` will turn ON *vi* keybindings and TAB completion::
python:bind -v
python:bind ^I rl_complete | initialization file located in your home directory is named ``.editrc``. For example, the following content in ``~/.editrc`` will turn ON *vi* keybindings and TAB completion::
python:bind -v
python:bind ^I rl_complete | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8d978298-a6c0-4129-893e-ee9c4a91582e | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,653 | supabase-export-v2 | 9d4a047952e5bedd | .. function:: get_begidx() get_endidx()
Get the beginning or ending index of the completion scope. These indexes are the *start* and *end* arguments passed to the
:c:data:`!rl_attempted_completion_function` callback of the
underlying library. The values may be different in the same
input editing scenario based on th... | trusted_official_docs | CPython Docs | .. function:: get_begidx() get_endidx()
Get the beginning or ending index of the completion scope. These indexes are the *start* and *end* arguments passed to the
:c:data:`!rl_attempted_completion_function` callback of the
underlying library. The values may be different in the same
input editing scenario based on th... | .. function:: get_begidx() get_endidx()
Get the beginning or ending index of the completion scope. These indexes are the *start* and *end* arguments passed to the
:c:data:`!rl_attempted_completion_function` callback of the
underlying library. The values may be different in the same
input editing scenario based on th... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a67df56a-154e-4107-b229-e922ab22ba9d | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,577 | supabase-export-v2 | 56729070a62ae8bf | --------------
The :mod:`!readline` module defines a number of functions to facilitate
completion and reading/writing of history files from the Python interpreter. This module can be used directly, or via the :mod:`rlcompleter` module, which
supports completion of Python identifiers at the interactive prompt. Settings
... | trusted_official_docs | CPython Docs | --------------
The :mod:`!readline` module defines a number of functions to facilitate
completion and reading/writing of history files from the Python interpreter. This module can be used directly, or via the :mod:`rlcompleter` module, which
supports completion of Python identifiers at the interactive prompt. Settings
... | --------------
The :mod:`!readline` module defines a number of functions to facilitate
completion and reading/writing of history files from the Python interpreter. This module can be used directly, or via the :mod:`rlcompleter` module, which
supports completion of Python identifiers at the interactive prompt. Settings
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ac3551cb-217d-494d-8f48-2a042d0d90ea | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,613 | supabase-export-v2 | f6dff96dda9f3a61 | .. function:: append_history_file(nelements[, filename])
Append the last *nelements* items of history to a file. The default filename is
:file:`~/.history`. The file must already exist. This calls
:c:func:`!append_history` in the underlying library. This function
only exists if Python was compiled for a version of t... | trusted_official_docs | CPython Docs | .. function:: append_history_file(nelements[, filename])
Append the last *nelements* items of history to a file. The default filename is
:file:`~/.history`. The file must already exist. This calls
:c:func:`!append_history` in the underlying library. This function
only exists if Python was compiled for a version of t... | .. function:: append_history_file(nelements[, filename])
Append the last *nelements* items of history to a file. The default filename is
:file:`~/.history`. The file must already exist. This calls
:c:func:`!append_history` in the underlying library. This function
only exists if Python was compiled for a version of t... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b1014daa-9ea8-44ac-951c-11dfa9744bd3 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,594 | supabase-export-v2 | 29a4e861d28e8b1a | .. function:: read_init_file([filename])
Execute a readline initialization file. The default filename is the last filename
used. This calls :c:func:`!rl_read_init_file` in the underlying library. It raises an :ref:`auditing event <auditing>` ``open`` with the file name
if given, and :code:`"<readline_init_file>"` oth... | trusted_official_docs | CPython Docs | .. function:: read_init_file([filename])
Execute a readline initialization file. The default filename is the last filename
used. This calls :c:func:`!rl_read_init_file` in the underlying library. It raises an :ref:`auditing event <auditing>` ``open`` with the file name
if given, and :code:`"<readline_init_file>"` oth... | .. function:: read_init_file([filename])
Execute a readline initialization file. The default filename is the last filename
used. This calls :c:func:`!rl_read_init_file` in the underlying library. It raises an :ref:`auditing event <auditing>` ``open`` with the file name
if given, and :code:`"<readline_init_file>"` oth... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b317b5c8-71b1-46cd-863e-3a0f45d9d5bd | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,664 | supabase-export-v2 | 94ead2842c454e24 | This code is actually automatically run when Python is run in :ref:`interactive mode <tut-interactive>` (see :ref:`rlcompleter-config`).
The following example achieves the same goal but supports concurrent interactive
sessions, by only appending the new history. :: | trusted_official_docs | CPython Docs | This code is actually automatically run when Python is run in :ref:`interactive mode <tut-interactive>` (see :ref:`rlcompleter-config`).
The following example achieves the same goal but supports concurrent interactive
sessions, by only appending the new history. :: | This code is actually automatically run when Python is run in :ref:`interactive mode <tut-interactive>` (see :ref:`rlcompleter-config`).
The following example achieves the same goal but supports concurrent interactive
sessions, by only appending the new history. :: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bf0cff38-5ba1-4c3b-bd94-15a50f68edb9 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,584 | supabase-export-v2 | bffd3a749c9f8fda | ``editline`` is different from that of GNU readline. If you programmatically load configuration strings you can use :data:`backend` to determine which library is being used.
If you use ``editline``/``libedit`` readline emulation on macOS, the
initialization file located in your home directory is named
``.editrc``. Fo... | trusted_official_docs | CPython Docs | ``editline`` is different from that of GNU readline. If you programmatically load configuration strings you can use :data:`backend` to determine which library is being used.
If you use ``editline``/``libedit`` readline emulation on macOS, the
initialization file located in your home directory is named
``.editrc``. Fo... | ``editline`` is different from that of GNU readline. If you programmatically load configuration strings you can use :data:`backend` to determine which library is being used.
If you use ``editline``/``libedit`` readline emulation on macOS, the
initialization file located in your home directory is named
``.editrc``. Fo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cc7da2d0-0936-47c0-8a99-d52b11baac89 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,607 | supabase-export-v2 | 8be5204371da5061 | .. function:: read_history_file([filename])
Load a readline history file, and append it to the history list. The default filename is :file:`~/.history`. This calls
:c:func:`!read_history` in the underlying library
and raises an :ref:`auditing event <auditing>` ``open`` with the file
name if given and :code:`"~/.hist... | trusted_official_docs | CPython Docs | .. function:: read_history_file([filename])
Load a readline history file, and append it to the history list. The default filename is :file:`~/.history`. This calls
:c:func:`!read_history` in the underlying library
and raises an :ref:`auditing event <auditing>` ``open`` with the file
name if given and :code:`"~/.hist... | .. function:: read_history_file([filename])
Load a readline history file, and append it to the history list. The default filename is :file:`~/.history`. This calls
:c:func:`!read_history` in the underlying library
and raises an :ref:`auditing event <auditing>` ``open`` with the file
name if given and :code:`"~/.hist... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cf3e3f3a-044d-415d-a334-a8b7be756302 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,610 | supabase-export-v2 | 99b435ebdb03ea91 | .. function:: write_history_file([filename])
Save the history list to a readline history file, overwriting any
existing file. The default filename is :file:`~/.history`. This calls
:c:func:`!write_history` in the underlying library and raises an
:ref:`auditing event <auditing>` ``open`` with the file name if given a... | trusted_official_docs | CPython Docs | .. function:: write_history_file([filename])
Save the history list to a readline history file, overwriting any
existing file. The default filename is :file:`~/.history`. This calls
:c:func:`!write_history` in the underlying library and raises an
:ref:`auditing event <auditing>` ``open`` with the file name if given a... | .. function:: write_history_file([filename])
Save the history list to a readline history file, overwriting any
existing file. The default filename is :file:`~/.history`. This calls
:c:func:`!write_history` in the underlying library and raises an
:ref:`auditing event <auditing>` ``open`` with the file name if given a... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dd59188d-b3a1-4886-8c48-f837571cd99d | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,647 | supabase-export-v2 | 10730ead796ef4f3 | ``function(text, state)``, for *state* in ``0``, ``1``, ``2``, ..., until it returns a non-string value. It should return the next possible completion starting with *text*.
The installed completer function is invoked by the *entry_func* callback
passed to :c:func:`!rl_completion_matches` in the underlying library. The... | trusted_official_docs | CPython Docs | ``function(text, state)``, for *state* in ``0``, ``1``, ``2``, ..., until it returns a non-string value. It should return the next possible completion starting with *text*.
The installed completer function is invoked by the *entry_func* callback
passed to :c:func:`!rl_completion_matches` in the underlying library. The... | ``function(text, state)``, for *state* in ``0``, ``1``, ``2``, ..., until it returns a non-string value. It should return the next possible completion starting with *text*.
The installed completer function is invoked by the *entry_func* callback
passed to :c:func:`!rl_completion_matches` in the underlying library. The... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f5d1198a-c971-424e-afc9-d1afefdafa32 | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,621 | supabase-export-v2 | 7341f3feee6bffad | .. function:: clear_history()
Clear the current history. This calls :c:func:`!clear_history` in the
underlying library. The Python function only exists if Python was
compiled for a version of the library that supports it. | trusted_official_docs | CPython Docs | .. function:: clear_history()
Clear the current history. This calls :c:func:`!clear_history` in the
underlying library. The Python function only exists if Python was
compiled for a version of the library that supports it. | .. function:: clear_history()
Clear the current history. This calls :c:func:`!clear_history` in the
underlying library. The Python function only exists if Python was
compiled for a version of the library that supports it. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f93b03a0-f793-47ae-984f-ce979879a31d | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,655 | supabase-export-v2 | 264dc490069b97c3 | .. function:: set_completer_delims(string) get_completer_delims()
Set or get the word delimiters for completion. These determine the
start of the word to be considered for completion (the completion scope). These functions access the :c:data:`!rl_completer_word_break_characters`
variable in the underlying library. | trusted_official_docs | CPython Docs | .. function:: set_completer_delims(string) get_completer_delims()
Set or get the word delimiters for completion. These determine the
start of the word to be considered for completion (the completion scope). These functions access the :c:data:`!rl_completer_word_break_characters`
variable in the underlying library. | .. function:: set_completer_delims(string) get_completer_delims()
Set or get the word delimiters for completion. These determine the
start of the word to be considered for completion (the completion scope). These functions access the :c:data:`!rl_completer_word_break_characters`
variable in the underlying library. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fc79137b-f6ba-40ec-823c-1b82a14ac41b | CPython Docs | file://datasets/cpython/Doc/library/readline.rst | unknown | 20a391c2-f28c-4657-92d4-41ff11bbc652 | 38,617 | supabase-export-v2 | c954f1d5d6229111 | .. function:: get_history_length() set_history_length(length)
Set or return the desired number of lines to save in the history file. The :func:`write_history_file` function uses this value to truncate
the history file, by calling :c:func:`!history_truncate_file` in
the underlying library. Negative values imply
unlim... | trusted_official_docs | CPython Docs | .. function:: get_history_length() set_history_length(length)
Set or return the desired number of lines to save in the history file. The :func:`write_history_file` function uses this value to truncate
the history file, by calling :c:func:`!history_truncate_file` in
the underlying library. Negative values imply
unlim... | .. function:: get_history_length() set_history_length(length)
Set or return the desired number of lines to save in the history file. The :func:`write_history_file` function uses this value to truncate
the history file, by calling :c:func:`!history_truncate_file` in
the underlying library. Negative values imply
unlim... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
054c6f3c-6651-4fd5-9be7-42ebb0ca6e79 | CPython Docs | file://datasets/cpython/Doc/library/sunau.rst | unknown | b680085e-84df-471c-9bfd-9fdb95832c47 | 38,679 | supabase-export-v2 | c89a5f64c57d7cc5 | part of the Python standard library. It was :ref:`removed in Python 3.13 <whatsnew313-pep594>` after being deprecated in Python 3.11. The removal was decided in :pep:`594`.
The last version of Python that provided the :mod:`!sunau` module was
`Python 3.12 <https://docs.python.org/3.12/library/sunau.html>`_. | trusted_official_docs | CPython Docs | part of the Python standard library. It was :ref:`removed in Python 3.13 <whatsnew313-pep594>` after being deprecated in Python 3.11. The removal was decided in :pep:`594`.
The last version of Python that provided the :mod:`!sunau` module was
`Python 3.12 <https://docs.python.org/3.12/library/sunau.html>`_. | part of the Python standard library. It was :ref:`removed in Python 3.13 <whatsnew313-pep594>` after being deprecated in Python 3.11. The removal was decided in :pep:`594`.
The last version of Python that provided the :mod:`!sunau` module was
`Python 3.12 <https://docs.python.org/3.12/library/sunau.html>`_. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
28922d68-f33f-45eb-8f7f-24792060effe | CPython Docs | file://datasets/cpython/Doc/library/secrets.rst | unknown | 8cfbb5b2-707d-40f5-84d6-e4a9d40cb6f8 | 38,737 | supabase-export-v2 | 4271bd326d62d8ca | .. testcode::
import secrets
# On standard Linux systems, use a convenient dictionary file. # Other platforms may need to provide their own word-list. with open('/usr/share/dict/words') as f:
words = [word.strip() for word in f]
password = ' '.join(secrets.choice(words) for i in range(4)) | trusted_official_docs | CPython Docs | .. testcode::
import secrets
# On standard Linux systems, use a convenient dictionary file. # Other platforms may need to provide their own word-list. with open('/usr/share/dict/words') as f:
words = [word.strip() for word in f]
password = ' '.join(secrets.choice(words) for i in range(4)) | .. testcode::
import secrets
# On standard Linux systems, use a convenient dictionary file. # Other platforms may need to provide their own word-list. with open('/usr/share/dict/words') as f:
words = [word.strip() for word in f]
password = ' '.join(secrets.choice(words) for i in range(4)) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4262b55d-4a11-4f64-8603-82637d0fdd1f | CPython Docs | file://datasets/cpython/Doc/library/secrets.rst | unknown | 8cfbb5b2-707d-40f5-84d6-e4a9d40cb6f8 | 38,735 | supabase-export-v2 | be6fddb70093a006 | for i in range(10)) if (any(c.islower() for c in password) and any(c.isupper() for c in password) and sum(c.isdigit() for c in password) >= 3): break
Generate an `XKCD-style passphrase <https://xkcd.com/936/>`_: | trusted_official_docs | CPython Docs | for i in range(10)) if (any(c.islower() for c in password) and any(c.isupper() for c in password) and sum(c.isdigit() for c in password) >= 3): break
Generate an `XKCD-style passphrase <https://xkcd.com/936/>`_: | for i in range(10)) if (any(c.islower() for c in password) and any(c.isupper() for c in password) and sum(c.isdigit() for c in password) >= 3): break
Generate an `XKCD-style passphrase <https://xkcd.com/936/>`_: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
522ec75c-1061-43fc-95b7-c693be5fe35b | CPython Docs | file://datasets/cpython/Doc/library/secrets.rst | unknown | 8cfbb5b2-707d-40f5-84d6-e4a9d40cb6f8 | 38,741 | supabase-export-v2 | 5c3cfea2fb13f5c1 | import secrets url = 'https://example.com/reset=' + secrets.token_urlsafe()
.. # This modeline must appear within the last ten lines of the file. kate: indent-width 3; remove-trailing-space on; replace-tabs on; encoding utf-8; | trusted_official_docs | CPython Docs | import secrets url = 'https://example.com/reset=' + secrets.token_urlsafe()
.. # This modeline must appear within the last ten lines of the file. kate: indent-width 3; remove-trailing-space on; replace-tabs on; encoding utf-8; | import secrets url = 'https://example.com/reset=' + secrets.token_urlsafe()
.. # This modeline must appear within the last ten lines of the file. kate: indent-width 3; remove-trailing-space on; replace-tabs on; encoding utf-8; | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5ddf4dac-7753-4370-a519-06723f278054 | CPython Docs | file://datasets/cpython/Doc/library/secrets.rst | unknown | 8cfbb5b2-707d-40f5-84d6-e4a9d40cb6f8 | 38,725 | supabase-export-v2 | f6e0172217b005ae | object>` *a* and *b* are equal, otherwise ``False``, using a "constant-time compare" to reduce the risk of `timing attacks <https://codahale.com/a-lesson-in-timing-attacks/>`_. See :func:`hmac.compare_digest` for additional details.
Recipes and best practices
-------------------------- | trusted_official_docs | CPython Docs | object>` *a* and *b* are equal, otherwise ``False``, using a "constant-time compare" to reduce the risk of `timing attacks <https://codahale.com/a-lesson-in-timing-attacks/>`_. See :func:`hmac.compare_digest` for additional details.
Recipes and best practices
-------------------------- | object>` *a* and *b* are equal, otherwise ``False``, using a "constant-time compare" to reduce the risk of `timing attacks <https://codahale.com/a-lesson-in-timing-attacks/>`_. See :func:`hmac.compare_digest` for additional details.
Recipes and best practices
-------------------------- | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7fd95799-78ea-47cb-ba85-6fbb9f0608b2 | CPython Docs | file://datasets/cpython/Doc/library/secrets.rst | unknown | 8cfbb5b2-707d-40f5-84d6-e4a9d40cb6f8 | 38,734 | supabase-export-v2 | c252b6fed55ca0d0 | .. testcode::
import string
import secrets
alphabet = string.ascii_letters + string.digits
while True:
password = ''.join(secrets.choice(alphabet) for i in range(10))
if (any(c.islower() for c in password)
and any(c.isupper() for c in password)
and sum(c.isdigit() for c in password) >= 3):
break | trusted_official_docs | CPython Docs | .. testcode::
import string
import secrets
alphabet = string.ascii_letters + string.digits
while True:
password = ''.join(secrets.choice(alphabet) for i in range(10))
if (any(c.islower() for c in password)
and any(c.isupper() for c in password)
and sum(c.isdigit() for c in password) >= 3):
break | .. testcode::
import string
import secrets
alphabet = string.ascii_letters + string.digits
while True:
password = ''.join(secrets.choice(alphabet) for i in range(10))
if (any(c.islower() for c in password)
and any(c.isupper() for c in password)
and sum(c.isdigit() for c in password) >= 3):
break | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9ead5915-0675-46e2-9cc1-ec68c1bdd90d | CPython Docs | file://datasets/cpython/Doc/library/secrets.rst | unknown | 8cfbb5b2-707d-40f5-84d6-e4a9d40cb6f8 | 38,712 | supabase-export-v2 | df726be7eee80fb3 | Return a random URL-safe text string, containing *nbytes* random bytes. The text is Base64 encoded, so on average each byte results in approximately 1.3 characters.
If *nbytes* is not specified or ``None``, :const:`DEFAULT_ENTROPY`
is used instead. | trusted_official_docs | CPython Docs | Return a random URL-safe text string, containing *nbytes* random bytes. The text is Base64 encoded, so on average each byte results in approximately 1.3 characters.
If *nbytes* is not specified or ``None``, :const:`DEFAULT_ENTROPY`
is used instead. | Return a random URL-safe text string, containing *nbytes* random bytes. The text is Base64 encoded, so on average each byte results in approximately 1.3 characters.
If *nbytes* is not specified or ``None``, :const:`DEFAULT_ENTROPY`
is used instead. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a0948b70-c83b-4062-890f-3004c31d1925 | CPython Docs | file://datasets/cpython/Doc/library/secrets.rst | unknown | 8cfbb5b2-707d-40f5-84d6-e4a9d40cb6f8 | 38,731 | supabase-export-v2 | e3d138ac294813f3 | .. note::
Applications should not
:cwe:`store passwords in a recoverable format <257>`,
whether plain text or encrypted. They should be salted and hashed
using a cryptographically strong one-way (irreversible) hash function. | trusted_official_docs | CPython Docs | .. note::
Applications should not
:cwe:`store passwords in a recoverable format <257>`,
whether plain text or encrypted. They should be salted and hashed
using a cryptographically strong one-way (irreversible) hash function. | .. note::
Applications should not
:cwe:`store passwords in a recoverable format <257>`,
whether plain text or encrypted. They should be salted and hashed
using a cryptographically strong one-way (irreversible) hash function. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ae8bbcdc-3a9b-409a-b126-f28a7e70bddf | CPython Docs | file://datasets/cpython/Doc/library/secrets.rst | unknown | 8cfbb5b2-707d-40f5-84d6-e4a9d40cb6f8 | 38,718 | supabase-export-v2 | 9f2725afb1b735f0 | for tokens by giving an :class:`int` argument to the various ``token_*`` functions. That argument is taken as the number of bytes of randomness to use.
Otherwise, if no argument is provided, or if the argument is ``None``,
the ``token_*`` functions use :const:`DEFAULT_ENTROPY` instead. | trusted_official_docs | CPython Docs | for tokens by giving an :class:`int` argument to the various ``token_*`` functions. That argument is taken as the number of bytes of randomness to use.
Otherwise, if no argument is provided, or if the argument is ``None``,
the ``token_*`` functions use :const:`DEFAULT_ENTROPY` instead. | for tokens by giving an :class:`int` argument to the various ``token_*`` functions. That argument is taken as the number of bytes of randomness to use.
Otherwise, if no argument is provided, or if the argument is ``None``,
the ``token_*`` functions use :const:`DEFAULT_ENTROPY` instead. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bfe05e2a-c3d8-4bc0-9660-15591b338506 | CPython Docs | file://datasets/cpython/Doc/library/secrets.rst | unknown | 8cfbb5b2-707d-40f5-84d6-e4a9d40cb6f8 | 38,687 | supabase-export-v2 | b95d5dd1380168bb | The :mod:`!secrets` module is used for generating cryptographically strong random numbers suitable for managing data such as passwords, account authentication, security tokens, and related secrets.
In particular, :mod:`!secrets` should be used in preference to the
default pseudo-random number generator in the :mod:`ran... | trusted_official_docs | CPython Docs | The :mod:`!secrets` module is used for generating cryptographically strong random numbers suitable for managing data such as passwords, account authentication, security tokens, and related secrets.
In particular, :mod:`!secrets` should be used in preference to the
default pseudo-random number generator in the :mod:`ran... | The :mod:`!secrets` module is used for generating cryptographically strong random numbers suitable for managing data such as passwords, account authentication, security tokens, and related secrets.
In particular, :mod:`!secrets` should be used in preference to the
default pseudo-random number generator in the :mod:`ran... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c949efa2-ebe4-48aa-8df9-62f2585289e6 | CPython Docs | file://datasets/cpython/Doc/library/secrets.rst | unknown | 8cfbb5b2-707d-40f5-84d6-e4a9d40cb6f8 | 38,724 | supabase-export-v2 | 89b8239a568a8e60 | .. function:: compare_digest(a, b)
Return ``True`` if strings or
:term:`bytes-like objects <bytes-like object>`
*a* and *b* are equal, otherwise ``False``,
using a "constant-time compare" to reduce the risk of
`timing attacks <https://codahale.com/a-lesson-in-timing-attacks/>`_. See :func:`hmac.compare_digest` for ... | trusted_official_docs | CPython Docs | .. function:: compare_digest(a, b)
Return ``True`` if strings or
:term:`bytes-like objects <bytes-like object>`
*a* and *b* are equal, otherwise ``False``,
using a "constant-time compare" to reduce the risk of
`timing attacks <https://codahale.com/a-lesson-in-timing-attacks/>`_. See :func:`hmac.compare_digest` for ... | .. function:: compare_digest(a, b)
Return ``True`` if strings or
:term:`bytes-like objects <bytes-like object>`
*a* and *b* are equal, otherwise ``False``,
using a "constant-time compare" to reduce the risk of
`timing attacks <https://codahale.com/a-lesson-in-timing-attacks/>`_. See :func:`hmac.compare_digest` for ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d79e61ee-deb5-4257-91c0-693f4e3e3f2c | CPython Docs | file://datasets/cpython/Doc/library/secrets.rst | unknown | 8cfbb5b2-707d-40f5-84d6-e4a9d40cb6f8 | 38,707 | supabase-export-v2 | 2c935869f95358ae | Return a random text string, in hexadecimal. The string has *nbytes* random bytes, each byte converted to two hex digits.
If *nbytes* is not specified or ``None``, :const:`DEFAULT_ENTROPY`
is used instead. | trusted_official_docs | CPython Docs | Return a random text string, in hexadecimal. The string has *nbytes* random bytes, each byte converted to two hex digits.
If *nbytes* is not specified or ``None``, :const:`DEFAULT_ENTROPY`
is used instead. | Return a random text string, in hexadecimal. The string has *nbytes* random bytes, each byte converted to two hex digits.
If *nbytes* is not specified or ``None``, :const:`DEFAULT_ENTROPY`
is used instead. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dada8117-8898-4f03-bf60-4ea141333ce3 | CPython Docs | file://datasets/cpython/Doc/library/secrets.rst | unknown | 8cfbb5b2-707d-40f5-84d6-e4a9d40cb6f8 | 38,732 | supabase-export-v2 | 33e94b3684c1ca59 | passwords in a recoverable format <257>`, whether plain text or encrypted. They should be salted and hashed using a cryptographically strong one-way (irreversible) hash function.
Generate a ten-character alphanumeric password with at least one
lowercase character, at least one uppercase character, and at least
three di... | trusted_official_docs | CPython Docs | passwords in a recoverable format <257>`, whether plain text or encrypted. They should be salted and hashed using a cryptographically strong one-way (irreversible) hash function.
Generate a ten-character alphanumeric password with at least one
lowercase character, at least one uppercase character, and at least
three di... | passwords in a recoverable format <257>`, whether plain text or encrypted. They should be salted and hashed using a cryptographically strong one-way (irreversible) hash function.
Generate a ten-character alphanumeric password with at least one
lowercase character, at least one uppercase character, and at least
three di... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e5cb9e38-613c-4ffd-ab7f-c7933fa79e3f | CPython Docs | file://datasets/cpython/Doc/library/secrets.rst | unknown | 8cfbb5b2-707d-40f5-84d6-e4a9d40cb6f8 | 38,738 | supabase-export-v2 | 3e73799650839c6a | need to provide their own word-list. with open('/usr/share/dict/words') as f: words = [word.strip() for word in f] password = ' '.join(secrets.choice(words) for i in range(4))
Generate a hard-to-guess temporary URL containing a security token
suitable for password recovery applications: | trusted_official_docs | CPython Docs | need to provide their own word-list. with open('/usr/share/dict/words') as f: words = [word.strip() for word in f] password = ' '.join(secrets.choice(words) for i in range(4))
Generate a hard-to-guess temporary URL containing a security token
suitable for password recovery applications: | need to provide their own word-list. with open('/usr/share/dict/words') as f: words = [word.strip() for word in f] password = ' '.join(secrets.choice(words) for i in range(4))
Generate a hard-to-guess temporary URL containing a security token
suitable for password recovery applications: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f51ccf93-e35d-488b-af97-fda65afd6fbb | CPython Docs | file://datasets/cpython/Doc/library/secrets.rst | unknown | 8cfbb5b2-707d-40f5-84d6-e4a9d40cb6f8 | 38,717 | supabase-export-v2 | de3091ff409d6369 | period. As of 2015, it is believed that 32 bytes (256 bits) of randomness is sufficient for the typical use-case expected for the :mod:`!secrets` module.
For those who want to manage their own token length, you can explicitly
specify how much randomness is used for tokens by giving an :class:`int`
argument to the vario... | trusted_official_docs | CPython Docs | period. As of 2015, it is believed that 32 bytes (256 bits) of randomness is sufficient for the typical use-case expected for the :mod:`!secrets` module.
For those who want to manage their own token length, you can explicitly
specify how much randomness is used for tokens by giving an :class:`int`
argument to the vario... | period. As of 2015, it is believed that 32 bytes (256 bits) of randomness is sufficient for the typical use-case expected for the :mod:`!secrets` module.
For those who want to manage their own token length, you can explicitly
specify how much randomness is used for tokens by giving an :class:`int`
argument to the vario... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f5dd2ba0-bfa5-42bd-b398-1b0d5fd7afb1 | CPython Docs | file://datasets/cpython/Doc/library/secrets.rst | unknown | 8cfbb5b2-707d-40f5-84d6-e4a9d40cb6f8 | 38,716 | supabase-export-v2 | f6a60474ec38deb7 | How many bytes should tokens use? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To be secure against
`brute-force attacks <https://en.wikipedia.org/wiki/Brute-force_attack>`_,
tokens need to have sufficient randomness. Unfortunately, what is
considered sufficient will necessarily increase as computers get more
powerful and able to... | trusted_official_docs | CPython Docs | How many bytes should tokens use? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To be secure against
`brute-force attacks <https://en.wikipedia.org/wiki/Brute-force_attack>`_,
tokens need to have sufficient randomness. Unfortunately, what is
considered sufficient will necessarily increase as computers get more
powerful and able to... | How many bytes should tokens use? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To be secure against
`brute-force attacks <https://en.wikipedia.org/wiki/Brute-force_attack>`_,
tokens need to have sufficient randomness. Unfortunately, what is
considered sufficient will necessarily increase as computers get more
powerful and able to... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4cea1a9b-2ac0-47f2-9c40-f022348eed48 | CPython Docs | file://datasets/cpython/Doc/library/stringprep.rst | unknown | 9c2aba7b-f1ad-43b2-ab6c-634d75aab70b | 38,749 | supabase-export-v2 | 65ceec6b00d28904 | to represent as dictionaries or lists, the module uses the Unicode character database internally. The module source code itself was generated using the ``mkstringprep.py`` utility.
As a result, these tables are exposed as functions, not as data structures. There are two kinds of tables in the RFC: sets and mappings. Fo... | trusted_official_docs | CPython Docs | to represent as dictionaries or lists, the module uses the Unicode character database internally. The module source code itself was generated using the ``mkstringprep.py`` utility.
As a result, these tables are exposed as functions, not as data structures. There are two kinds of tables in the RFC: sets and mappings. Fo... | to represent as dictionaries or lists, the module uses the Unicode character database internally. The module source code itself was generated using the ``mkstringprep.py`` utility.
As a result, these tables are exposed as functions, not as data structures. There are two kinds of tables in the RFC: sets and mappings. Fo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d2172617-f3a8-4e46-8c0f-4ed4abf2d078 | CPython Docs | file://datasets/cpython/Doc/library/stringprep.rst | unknown | 9c2aba7b-f1ad-43b2-ab6c-634d75aab70b | 38,746 | supabase-export-v2 | 88cb1de4af49cbe6 | --------------
When identifying things (such as host names) in the internet, it is often
necessary to compare such identifications for "equality". Exactly how this
comparison is executed may depend on the application domain, e.g. whether it
should be case-insensitive or not. It may be also necessary to restrict the
pos... | trusted_official_docs | CPython Docs | --------------
When identifying things (such as host names) in the internet, it is often
necessary to compare such identifications for "equality". Exactly how this
comparison is executed may depend on the application domain, e.g. whether it
should be case-insensitive or not. It may be also necessary to restrict the
pos... | --------------
When identifying things (such as host names) in the internet, it is often
necessary to compare such identifications for "equality". Exactly how this
comparison is executed may depend on the application domain, e.g. whether it
should be case-insensitive or not. It may be also necessary to restrict the
pos... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d612bc7d-edbe-463e-b689-105099920054 | CPython Docs | file://datasets/cpython/Doc/library/stringprep.rst | unknown | 9c2aba7b-f1ad-43b2-ab6c-634d75aab70b | 38,747 | supabase-export-v2 | 6cf5d5722efb3a57 | whether it should be case-insensitive or not. It may be also necessary to restrict the possible identifications, to allow only identifications consisting of "printable" characters.
:rfc:`3454` defines a procedure for "preparing" Unicode strings in internet
protocols. Before passing strings onto the wire, they are proce... | trusted_official_docs | CPython Docs | whether it should be case-insensitive or not. It may be also necessary to restrict the possible identifications, to allow only identifications consisting of "printable" characters.
:rfc:`3454` defines a procedure for "preparing" Unicode strings in internet
protocols. Before passing strings onto the wire, they are proce... | whether it should be case-insensitive or not. It may be also necessary to restrict the possible identifications, to allow only identifications consisting of "printable" characters.
:rfc:`3454` defines a procedure for "preparing" Unicode strings in internet
protocols. Before passing strings onto the wire, they are proce... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e0f80d33-6954-4c6d-93cb-3c96343b39d0 | CPython Docs | file://datasets/cpython/Doc/library/stringprep.rst | unknown | 9c2aba7b-f1ad-43b2-ab6c-634d75aab70b | 38,748 | supabase-export-v2 | aa82fa951a57a6c1 | parts of the ``stringprep`` procedure are part of the profile. One example of a ``stringprep`` profile is ``nameprep``, which is used for internationalized domain names.
The module :mod:`!stringprep` only exposes the tables from :rfc:`3454`. As these
tables would be very large to represent as dictionaries or lists, the... | trusted_official_docs | CPython Docs | parts of the ``stringprep`` procedure are part of the profile. One example of a ``stringprep`` profile is ``nameprep``, which is used for internationalized domain names.
The module :mod:`!stringprep` only exposes the tables from :rfc:`3454`. As these
tables would be very large to represent as dictionaries or lists, the... | parts of the ``stringprep`` procedure are part of the profile. One example of a ``stringprep`` profile is ``nameprep``, which is used for internationalized domain names.
The module :mod:`!stringprep` only exposes the tables from :rfc:`3454`. As these
tables would be very large to represent as dictionaries or lists, the... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
27623541-d839-4466-8ec0-ff46c23ebdf3 | CPython Docs | file://datasets/cpython/Doc/library/pwd.rst | unknown | 54681545-ae39-42dc-8dd4-019998ed620d | 38,794 | supabase-export-v2 | edf488d6aa022865 | Password database entries are reported as a tuple-like object, whose attributes correspond to the members of the ``passwd`` structure (Attribute field below, see ``<pwd.h>``):
+-------+---------------+-----------------------------+
| Index | Attribute | Meaning |
+=======+===============+=============================+
... | trusted_official_docs | CPython Docs | Password database entries are reported as a tuple-like object, whose attributes correspond to the members of the ``passwd`` structure (Attribute field below, see ``<pwd.h>``):
+-------+---------------+-----------------------------+
| Index | Attribute | Meaning |
+=======+===============+=============================+
... | Password database entries are reported as a tuple-like object, whose attributes correspond to the members of the ``passwd`` structure (Attribute field below, see ``<pwd.h>``):
+-------+---------------+-----------------------------+
| Index | Attribute | Meaning |
+=======+===============+=============================+
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ab73d874-7983-4c8d-b97b-7c633c5a1dc0 | CPython Docs | file://datasets/cpython/Doc/library/pwd.rst | unknown | 54681545-ae39-42dc-8dd4-019998ed620d | 38,795 | supabase-export-v2 | 62d754cd83a9ebea | or comment field | +-------+---------------+-----------------------------+ | 5 | ``pw_dir`` | User home directory | +-------+---------------+-----------------------------+ | 6 | ``pw_shell`` | User command interpreter | +-------+---------------+-----------------------------+
The uid and gid items are integers, all othe... | trusted_official_docs | CPython Docs | or comment field | +-------+---------------+-----------------------------+ | 5 | ``pw_dir`` | User home directory | +-------+---------------+-----------------------------+ | 6 | ``pw_shell`` | User command interpreter | +-------+---------------+-----------------------------+
The uid and gid items are integers, all othe... | or comment field | +-------+---------------+-----------------------------+ | 5 | ``pw_dir`` | User home directory | +-------+---------------+-----------------------------+ | 6 | ``pw_shell`` | User command interpreter | +-------+---------------+-----------------------------+
The uid and gid items are integers, all othe... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b209d918-6944-498f-9913-3415d3eb22cb | CPython Docs | file://datasets/cpython/Doc/library/pwd.rst | unknown | 54681545-ae39-42dc-8dd4-019998ed620d | 38,798 | supabase-export-v2 | 48541fbaac46f29e | ``'x'`` where the encrypted password is stored in a file :file:`/etc/shadow` which is not world readable. Whether the *pw_passwd* field contains anything useful is system-dependent.
It defines the following items: | trusted_official_docs | CPython Docs | ``'x'`` where the encrypted password is stored in a file :file:`/etc/shadow` which is not world readable. Whether the *pw_passwd* field contains anything useful is system-dependent.
It defines the following items: | ``'x'`` where the encrypted password is stored in a file :file:`/etc/shadow` which is not world readable. Whether the *pw_passwd* field contains anything useful is system-dependent.
It defines the following items: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b7985c43-6f79-4fc3-8f38-6bf3f197d099 | CPython Docs | file://datasets/cpython/Doc/library/pwd.rst | unknown | 54681545-ae39-42dc-8dd4-019998ed620d | 38,793 | supabase-export-v2 | 8e5e6d6f41c8f255 | .. availability:: Unix, not WASI, not iOS.
Password database entries are reported as a tuple-like object, whose attributes
correspond to the members of the ``passwd`` structure (Attribute field below,
see ``<pwd.h>``): | trusted_official_docs | CPython Docs | .. availability:: Unix, not WASI, not iOS.
Password database entries are reported as a tuple-like object, whose attributes
correspond to the members of the ``passwd`` structure (Attribute field below,
see ``<pwd.h>``): | .. availability:: Unix, not WASI, not iOS.
Password database entries are reported as a tuple-like object, whose attributes
correspond to the members of the ``passwd`` structure (Attribute field below,
see ``<pwd.h>``): | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b886fe84-93a1-4369-822b-0afb3c979997 | CPython Docs | file://datasets/cpython/Doc/library/pwd.rst | unknown | 54681545-ae39-42dc-8dd4-019998ed620d | 38,797 | supabase-export-v2 | 0bb455288c92d681 | .. note::
In traditional Unix the field ``pw_passwd`` usually contains a password
encrypted with a DES derived algorithm. However most
modern unices use a so-called *shadow password* system. On those unices the
*pw_passwd* field only contains an asterisk (``'*'``) or the letter ``'x'``
where the encrypted password ... | trusted_official_docs | CPython Docs | .. note::
In traditional Unix the field ``pw_passwd`` usually contains a password
encrypted with a DES derived algorithm. However most
modern unices use a so-called *shadow password* system. On those unices the
*pw_passwd* field only contains an asterisk (``'*'``) or the letter ``'x'``
where the encrypted password ... | .. note::
In traditional Unix the field ``pw_passwd`` usually contains a password
encrypted with a DES derived algorithm. However most
modern unices use a so-called *shadow password* system. On those unices the
*pw_passwd* field only contains an asterisk (``'*'``) or the letter ``'x'``
where the encrypted password ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0329b43c-146a-4412-a794-79a4ccf2285c | CPython Docs | file://datasets/cpython/Doc/library/http.server.rst | unknown | e976d555-1adf-4f24-9bdc-4df94ec4798f | 39,006 | supabase-export-v2 | 5cb3ee1580b5f44a | -m http.server`` or the default :class:`BaseHTTPRequestHandler` ``.log_message`` implementation. This could allow remote clients connecting to your server to send nefarious control codes to your terminal.
.. versionchanged:: 3.12
Control characters are scrubbed in stderr logs. | trusted_official_docs | CPython Docs | -m http.server`` or the default :class:`BaseHTTPRequestHandler` ``.log_message`` implementation. This could allow remote clients connecting to your server to send nefarious control codes to your terminal.
.. versionchanged:: 3.12
Control characters are scrubbed in stderr logs. | -m http.server`` or the default :class:`BaseHTTPRequestHandler` ``.log_message`` implementation. This could allow remote clients connecting to your server to send nefarious control codes to your terminal.
.. versionchanged:: 3.12
Control characters are scrubbed in stderr logs. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
04112c7c-fbc2-4e0a-adda-7349e1e2731a | CPython Docs | file://datasets/cpython/Doc/library/http.server.rst | unknown | e976d555-1adf-4f24-9bdc-4df94ec4798f | 38,817 | supabase-export-v2 | 44cef228884f9766 | subclass. It creates and listens at the HTTP socket, dispatching the requests to a handler. Code to create and run the server looks like this::
def run(server_class=HTTPServer, handler_class=BaseHTTPRequestHandler):
server_address = ('', 8000)
httpd = server_class(server_address, handler_class)
httpd.serve_forever() | trusted_official_docs | CPython Docs | subclass. It creates and listens at the HTTP socket, dispatching the requests to a handler. Code to create and run the server looks like this::
def run(server_class=HTTPServer, handler_class=BaseHTTPRequestHandler):
server_address = ('', 8000)
httpd = server_class(server_address, handler_class)
httpd.serve_forever() | subclass. It creates and listens at the HTTP socket, dispatching the requests to a handler. Code to create and run the server looks like this::
def run(server_class=HTTPServer, handler_class=BaseHTTPRequestHandler):
server_address = ('', 8000)
httpd = server_class(server_address, handler_class)
httpd.serve_forever() | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
062c5222-c5a9-45dc-9b71-1380e867d8f0 | CPython Docs | file://datasets/cpython/Doc/library/http.server.rst | unknown | e976d555-1adf-4f24-9bdc-4df94ec4798f | 38,945 | supabase-export-v2 | 21642cd9bba25ccb | with the guessed content type is output, followed by a ``'Content-Length:'`` header with the file's size and a ``'Last-Modified:'`` header with the file's modification time.
The instance attribute :attr:`extra_response_headers` is a sequence of
``(name, value)`` pairs containing user-defined extra response headers. | trusted_official_docs | CPython Docs | with the guessed content type is output, followed by a ``'Content-Length:'`` header with the file's size and a ``'Last-Modified:'`` header with the file's modification time.
The instance attribute :attr:`extra_response_headers` is a sequence of
``(name, value)`` pairs containing user-defined extra response headers. | with the guessed content type is output, followed by a ``'Content-Length:'`` header with the file's size and a ``'Last-Modified:'`` header with the file's modification time.
The instance attribute :attr:`extra_response_headers` is a sequence of
``(name, value)`` pairs containing user-defined extra response headers. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0793fcd5-9f45-4b21-89d7-37f061da6a40 | CPython Docs | file://datasets/cpython/Doc/library/http.server.rst | unknown | e976d555-1adf-4f24-9bdc-4df94ec4798f | 38,838 | supabase-export-v2 | 051055bb8d92b82a | to handle each request method (for example, ``'GET'`` or ``'POST'``). :class:`BaseHTTPRequestHandler` provides a number of class and instance variables, and methods for use by subclasses.
The handler will parse the request and the headers, then call a method
specific to the request type. The method name is constructed... | trusted_official_docs | CPython Docs | to handle each request method (for example, ``'GET'`` or ``'POST'``). :class:`BaseHTTPRequestHandler` provides a number of class and instance variables, and methods for use by subclasses.
The handler will parse the request and the headers, then call a method
specific to the request type. The method name is constructed... | to handle each request method (for example, ``'GET'`` or ``'POST'``). :class:`BaseHTTPRequestHandler` provides a number of class and instance variables, and methods for use by subclasses.
The handler will parse the request and the headers, then call a method
specific to the request type. The method name is constructed... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0b68572f-dfe0-4732-8e2b-c850b1246be5 | CPython Docs | file://datasets/cpython/Doc/library/http.server.rst | unknown | e976d555-1adf-4f24-9bdc-4df94ec4798f | 38,947 | supabase-export-v2 | de0650accf83d45e | Then follows a blank line signifying the end of the headers, and then the contents of the file are output.
For example usage, see the implementation of the ``test`` function
in :source:`Lib/http/server.py`. | trusted_official_docs | CPython Docs | Then follows a blank line signifying the end of the headers, and then the contents of the file are output.
For example usage, see the implementation of the ``test`` function
in :source:`Lib/http/server.py`. | Then follows a blank line signifying the end of the headers, and then the contents of the file are output.
For example usage, see the implementation of the ``test`` function
in :source:`Lib/http/server.py`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0d741027-4daf-4c14-a5b2-fb11e0ea70d9 | CPython Docs | file://datasets/cpython/Doc/library/http.server.rst | unknown | e976d555-1adf-4f24-9bdc-4df94ec4798f | 38,885 | supabase-export-v2 | ae9d02744d404d79 | .. method:: send_error(code, message=None, explain=None)
Sends and logs a complete error reply to the client. The numeric *code*
specifies the HTTP error code, with *message* as an optional, short, human
readable description of the error. The *explain* argument can be used to
provide more detailed information about ... | trusted_official_docs | CPython Docs | .. method:: send_error(code, message=None, explain=None)
Sends and logs a complete error reply to the client. The numeric *code*
specifies the HTTP error code, with *message* as an optional, short, human
readable description of the error. The *explain* argument can be used to
provide more detailed information about ... | .. method:: send_error(code, message=None, explain=None)
Sends and logs a complete error reply to the client. The numeric *code*
specifies the HTTP error code, with *message* as an optional, short, human
readable description of the error. The *explain* argument can be used to
provide more detailed information about ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1d54664a-beb5-447d-b639-d4afe0373acd | CPython Docs | file://datasets/cpython/Doc/library/http.server.rst | unknown | e976d555-1adf-4f24-9bdc-4df94ec4798f | 38,889 | supabase-export-v2 | fcef9a1cf3f87a44 | respectively. If the server does not intend to send any other headers using the :meth:`send_header` method, then :meth:`send_response` should be followed by an :meth:`end_headers` call.
.. versionchanged:: 3.3
Headers are stored to an internal buffer and :meth:`end_headers`
needs to be called explicitly. | trusted_official_docs | CPython Docs | respectively. If the server does not intend to send any other headers using the :meth:`send_header` method, then :meth:`send_response` should be followed by an :meth:`end_headers` call.
.. versionchanged:: 3.3
Headers are stored to an internal buffer and :meth:`end_headers`
needs to be called explicitly. | respectively. If the server does not intend to send any other headers using the :meth:`send_header` method, then :meth:`send_response` should be followed by an :meth:`end_headers` call.
.. versionchanged:: 3.3
Headers are stored to an internal buffer and :meth:`end_headers`
needs to be called explicitly. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
23078ed1-a585-4be7-b2e0-eb5013d173a2 | CPython Docs | file://datasets/cpython/Doc/library/http.server.rst | unknown | e976d555-1adf-4f24-9bdc-4df94ec4798f | 38,875 | supabase-export-v2 | dcbb5d13427a1fbd | .. attribute:: responses
This attribute contains a mapping of error code integers to two-element tuples
containing a short and long message. For example, ``{code: (shortmessage,
longmessage)}``. The *shortmessage* is usually used as the *message* key in an
error response, and *longmessage* as the *explain* key. It i... | trusted_official_docs | CPython Docs | .. attribute:: responses
This attribute contains a mapping of error code integers to two-element tuples
containing a short and long message. For example, ``{code: (shortmessage,
longmessage)}``. The *shortmessage* is usually used as the *message* key in an
error response, and *longmessage* as the *explain* key. It i... | .. attribute:: responses
This attribute contains a mapping of error code integers to two-element tuples
containing a short and long message. For example, ``{code: (shortmessage,
longmessage)}``. The *shortmessage* is usually used as the *message* key in an
error response, and *longmessage* as the *explain* key. It i... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
245301f3-2929-4dca-b189-1b0e687ed5fd | CPython Docs | file://datasets/cpython/Doc/library/http.server.rst | unknown | e976d555-1adf-4f24-9bdc-4df94ec4798f | 38,837 | supabase-export-v2 | c79635137e459a35 | .. class:: BaseHTTPRequestHandler(request, client_address, server)
This class is used to handle the HTTP requests that arrive at the server. By
itself, it cannot respond to any actual HTTP requests; it must be subclassed
to handle each request method (for example, ``'GET'`` or ``'POST'``). :class:`BaseHTTPRequestHand... | trusted_official_docs | CPython Docs | .. class:: BaseHTTPRequestHandler(request, client_address, server)
This class is used to handle the HTTP requests that arrive at the server. By
itself, it cannot respond to any actual HTTP requests; it must be subclassed
to handle each request method (for example, ``'GET'`` or ``'POST'``). :class:`BaseHTTPRequestHand... | .. class:: BaseHTTPRequestHandler(request, client_address, server)
This class is used to handle the HTTP requests that arrive at the server. By
itself, it cannot respond to any actual HTTP requests; it must be subclassed
to handle each request method (for example, ``'GET'`` or ``'POST'``). :class:`BaseHTTPRequestHand... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
254e9008-f8a1-4eff-a427-32bd6ddc82af | CPython Docs | file://datasets/cpython/Doc/library/http.server.rst | unknown | e976d555-1adf-4f24-9bdc-4df94ec4798f | 38,867 | supabase-export-v2 | b0e72c82925351a6 | .. attribute:: error_message_format
Specifies a format string that should be used by :meth:`send_error` method
for building an error response to the client. The string is filled by
default with variables from :attr:`responses` based on the status code
that passed to :meth:`send_error`. | trusted_official_docs | CPython Docs | .. attribute:: error_message_format
Specifies a format string that should be used by :meth:`send_error` method
for building an error response to the client. The string is filled by
default with variables from :attr:`responses` based on the status code
that passed to :meth:`send_error`. | .. attribute:: error_message_format
Specifies a format string that should be used by :meth:`send_error` method
for building an error response to the client. The string is filled by
default with variables from :attr:`responses` based on the status code
that passed to :meth:`send_error`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
28ab3163-d16d-4974-99b7-3e2e5b4a070b | CPython Docs | file://datasets/cpython/Doc/library/http.server.rst | unknown | e976d555-1adf-4f24-9bdc-4df94ec4798f | 38,919 | supabase-export-v2 | 0cd13d20c31e3705 | .. versionchanged:: 3.3 Previously, a name lookup was performed. To avoid name resolution delays, it now always returns the IP address.
.. class:: SimpleHTTPRequestHandler(request, client_address, server, \
*, directory=None, extra_response_headers=None) | trusted_official_docs | CPython Docs | .. versionchanged:: 3.3 Previously, a name lookup was performed. To avoid name resolution delays, it now always returns the IP address.
.. class:: SimpleHTTPRequestHandler(request, client_address, server, \
*, directory=None, extra_response_headers=None) | .. versionchanged:: 3.3 Previously, a name lookup was performed. To avoid name resolution delays, it now always returns the IP address.
.. class:: SimpleHTTPRequestHandler(request, client_address, server, \
*, directory=None, extra_response_headers=None) | python, official-docs, cpython, P0 | Local_Trusted_Corpus |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.