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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9721a9b8-dc74-4866-9651-834223ee3b98 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,225 | supabase-export-v2 | 0842ae0fedc06754 | an object which can work as a :term:`context manager` and has the properties *url*, *headers*, and *status*. See :class:`urllib.response.addinfourl` for more detail on these properties.
For HTTP and HTTPS URLs, this function returns a
:class:`http.client.HTTPResponse` object slightly modified. In addition
to the thre... | trusted_official_docs | CPython Docs | an object which can work as a :term:`context manager` and has the properties *url*, *headers*, and *status*. See :class:`urllib.response.addinfourl` for more detail on these properties.
For HTTP and HTTPS URLs, this function returns a
:class:`http.client.HTTPResponse` object slightly modified. In addition
to the thre... | an object which can work as a :term:`context manager` and has the properties *url*, *headers*, and *status*. See :class:`urllib.response.addinfourl` for more detail on these properties.
For HTTP and HTTPS URLs, this function returns a
:class:`http.client.HTTPResponse` object slightly modified. In addition
to the thre... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
981b744f-9682-4ca2-a382-4e7a0094c776 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,229 | supabase-export-v2 | ccb5920bbaab75e1 | Note that ``None`` may be returned if no handler handles the request (though the default installed global :class:`OpenerDirector` uses :class:`UnknownHandler` to ensure this never happens).
In addition, if proxy settings are detected (for example, when a ``*_proxy``
environment variable like :envvar:`!http_proxy` is s... | trusted_official_docs | CPython Docs | Note that ``None`` may be returned if no handler handles the request (though the default installed global :class:`OpenerDirector` uses :class:`UnknownHandler` to ensure this never happens).
In addition, if proxy settings are detected (for example, when a ``*_proxy``
environment variable like :envvar:`!http_proxy` is s... | Note that ``None`` may be returned if no handler handles the request (though the default installed global :class:`OpenerDirector` uses :class:`UnknownHandler` to ensure this never happens).
In addition, if proxy settings are detected (for example, when a ``*_proxy``
environment variable like :envvar:`!http_proxy` is s... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9a16c8a6-9d06-4762-9b38-7c8a223b80ef | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,215 | supabase-export-v2 | 90e9f40510591c4a | .. warning::
On macOS it is unsafe to use this module in programs using
:func:`os.fork` because the :func:`getproxies` implementation for
macOS uses a higher-level system API. Set the environment variable
``no_proxy`` to ``*`` to avoid this problem
(e.g. ``os.environ["no_proxy"] = "*"``). | trusted_official_docs | CPython Docs | .. warning::
On macOS it is unsafe to use this module in programs using
:func:`os.fork` because the :func:`getproxies` implementation for
macOS uses a higher-level system API. Set the environment variable
``no_proxy`` to ``*`` to avoid this problem
(e.g. ``os.environ["no_proxy"] = "*"``). | .. warning::
On macOS it is unsafe to use this module in programs using
:func:`os.fork` because the :func:`getproxies` implementation for
macOS uses a higher-level system API. Set the environment variable
``no_proxy`` to ``*`` to avoid this problem
(e.g. ``os.environ["no_proxy"] = "*"``). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9d2aed1e-5fa2-428a-8f62-cbe95e102b42 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,308 | supabase-export-v2 | cd5ad35b5b0335e1 | .. class:: AbstractBasicAuthHandler(password_mgr=None)
This is a mixin class that helps with HTTP authentication, both to the remote
host and to a proxy. *password_mgr*, if given, should be something that is
compatible with :class:`HTTPPasswordMgr`; refer to section
:ref:`http-password-mgr` for information on the in... | trusted_official_docs | CPython Docs | .. class:: AbstractBasicAuthHandler(password_mgr=None)
This is a mixin class that helps with HTTP authentication, both to the remote
host and to a proxy. *password_mgr*, if given, should be something that is
compatible with :class:`HTTPPasswordMgr`; refer to section
:ref:`http-password-mgr` for information on the in... | .. class:: AbstractBasicAuthHandler(password_mgr=None)
This is a mixin class that helps with HTTP authentication, both to the remote
host and to a proxy. *password_mgr*, if given, should be something that is
compatible with :class:`HTTPPasswordMgr`; refer to section
:ref:`http-password-mgr` for information on the in... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9db534b8-9b19-4788-8bc6-9ab4da878115 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,581 | supabase-export-v2 | 9041d02b2a5e7060 | Use the *headers* argument to the :class:`Request` constructor, or::
import urllib.request
req = urllib.request.Request('http://www.example.com/')
req.add_header('Referer', 'http://www.python.org/')
# Customize the default User-Agent header value:
req.add_header('User-Agent', 'urllib-example/0.1 (Contact: . . .)')
... | trusted_official_docs | CPython Docs | Use the *headers* argument to the :class:`Request` constructor, or::
import urllib.request
req = urllib.request.Request('http://www.example.com/')
req.add_header('Referer', 'http://www.python.org/')
# Customize the default User-Agent header value:
req.add_header('User-Agent', 'urllib-example/0.1 (Contact: . . .)')
... | Use the *headers* argument to the :class:`Request` constructor, or::
import urllib.request
req = urllib.request.Request('http://www.example.com/')
req.add_header('Referer', 'http://www.python.org/')
# Customize the default User-Agent header value:
req.add_header('User-Agent', 'urllib-example/0.1 (Contact: . . .)')
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9e2517a7-cad7-4adc-acf3-1cd679f1ff7a | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,427 | supabase-export-v2 | 68a4b237d36168ed | is *not* defined in :class:`BaseHandler`, but subclasses should define it if they want to catch all URLs with no specific registered handler to open it.
This method, if implemented, will be called by the :attr:`parent`
:class:`OpenerDirector`. Return values should be the same as for
:meth:`default_open`. | trusted_official_docs | CPython Docs | is *not* defined in :class:`BaseHandler`, but subclasses should define it if they want to catch all URLs with no specific registered handler to open it.
This method, if implemented, will be called by the :attr:`parent`
:class:`OpenerDirector`. Return values should be the same as for
:meth:`default_open`. | is *not* defined in :class:`BaseHandler`, but subclasses should define it if they want to catch all URLs with no specific registered handler to open it.
This method, if implemented, will be called by the :attr:`parent`
:class:`OpenerDirector`. Return values should be the same as for
:meth:`default_open`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a034f18a-d5f2-4938-ad2f-3791347f831a | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,265 | supabase-export-v2 | 9c8e753e0776c11d | .. function:: getproxies()
This helper function returns a dictionary of scheme to proxy server URL
mappings. It scans the environment for variables named ``<scheme>_proxy``,
in a case insensitive approach, for all operating systems first, and when it
cannot find it, looks for proxy information from System
Configura... | trusted_official_docs | CPython Docs | .. function:: getproxies()
This helper function returns a dictionary of scheme to proxy server URL
mappings. It scans the environment for variables named ``<scheme>_proxy``,
in a case insensitive approach, for all operating systems first, and when it
cannot find it, looks for proxy information from System
Configura... | .. function:: getproxies()
This helper function returns a dictionary of scheme to proxy server URL
mappings. It scans the environment for variables named ``<scheme>_proxy``,
in a case insensitive approach, for all operating systems first, and when it
cannot find it, looks for proxy information from System
Configura... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a93d0d6a-6ad5-48ec-80d6-154c11a1c2c1 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,297 | supabase-export-v2 | 4861aaa854f1ede4 | To disable autodetected proxy pass an empty dictionary.
The :envvar:`no_proxy` environment variable can be used to specify hosts
which shouldn't be reached via proxy; if set, it should be a comma-separated
list of hostname suffixes, optionally with ``:port`` appended, for example
``cern.ch,ncsa.uiuc.edu,some.host:80... | trusted_official_docs | CPython Docs | To disable autodetected proxy pass an empty dictionary.
The :envvar:`no_proxy` environment variable can be used to specify hosts
which shouldn't be reached via proxy; if set, it should be a comma-separated
list of hostname suffixes, optionally with ``:port`` appended, for example
``cern.ch,ncsa.uiuc.edu,some.host:80... | To disable autodetected proxy pass an empty dictionary.
The :envvar:`no_proxy` environment variable can be used to specify hosts
which shouldn't be reached via proxy; if set, it should be a comma-separated
list of hostname suffixes, optionally with ``:port`` appended, for example
``cern.ch,ncsa.uiuc.edu,some.host:80... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ac7451cc-9f81-4fdc-b63a-ccb3c2b1b697 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,296 | supabase-export-v2 | a9de17a9ceb437c5 | environment proxy settings are obtained from the registry's Internet Settings section, and in a macOS environment proxy information is retrieved from the System Configuration Framework.
To disable autodetected proxy pass an empty dictionary. | trusted_official_docs | CPython Docs | environment proxy settings are obtained from the registry's Internet Settings section, and in a macOS environment proxy information is retrieved from the System Configuration Framework.
To disable autodetected proxy pass an empty dictionary. | environment proxy settings are obtained from the registry's Internet Settings section, and in a macOS environment proxy information is retrieved from the System Configuration Framework.
To disable autodetected proxy pass an empty dictionary. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
aeb9801f-91fc-46d6-a365-52efd73acc29 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,256 | supabase-export-v2 | 44f08645da0be9fc | Convert the given ``file:`` URL to a local path. This function uses :func:`~urllib.parse.unquote` to decode the URL.
If *require_scheme* is false (the default), the given value should omit a
``file:`` scheme prefix. If *require_scheme* is set to true, the given
value should include the prefix; a :exc:`~urllib.error.U... | trusted_official_docs | CPython Docs | Convert the given ``file:`` URL to a local path. This function uses :func:`~urllib.parse.unquote` to decode the URL.
If *require_scheme* is false (the default), the given value should omit a
``file:`` scheme prefix. If *require_scheme* is set to true, the given
value should include the prefix; a :exc:`~urllib.error.U... | Convert the given ``file:`` URL to a local path. This function uses :func:`~urllib.parse.unquote` to decode the URL.
If *require_scheme* is false (the default), the given value should omit a
``file:`` scheme prefix. If *require_scheme* is set to true, the given
value should include the prefix; a :exc:`~urllib.error.U... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
aede850d-07da-4b27-b13a-ee4619dcb560 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,620 | supabase-export-v2 | 1b62a3bf83cdd5e0 | it inaccessible; the FTP code will try to read it, fail with a 550 error, and then perform a directory listing for the unreadable file.
If fine-grained control is needed, consider
using the :mod:`ftplib` module. | trusted_official_docs | CPython Docs | it inaccessible; the FTP code will try to read it, fail with a 550 error, and then perform a directory listing for the unreadable file.
If fine-grained control is needed, consider
using the :mod:`ftplib` module. | it inaccessible; the FTP code will try to read it, fail with a 550 error, and then perform a directory listing for the unreadable file.
If fine-grained control is needed, consider
using the :mod:`ftplib` module. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b11448aa-6b29-4358-b880-4d07f5c6f78e | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,251 | supabase-export-v2 | 1d316d5cad805862 | >>> from urllib.request import pathname2url >>> path = 'C:\\Program Files' >>> pathname2url(path, add_scheme=True) 'file:///C:/Program%20Files'
.. versionchanged:: 3.14
Windows drive letters are no longer converted to uppercase, and ``:``
characters not following a drive letter no longer cause an
:exc:`OSError` exce... | trusted_official_docs | CPython Docs | >>> from urllib.request import pathname2url >>> path = 'C:\\Program Files' >>> pathname2url(path, add_scheme=True) 'file:///C:/Program%20Files'
.. versionchanged:: 3.14
Windows drive letters are no longer converted to uppercase, and ``:``
characters not following a drive letter no longer cause an
:exc:`OSError` exce... | >>> from urllib.request import pathname2url >>> path = 'C:\\Program Files' >>> pathname2url(path, add_scheme=True) 'file:///C:/Program%20Files'
.. versionchanged:: 3.14
Windows drive letters are no longer converted to uppercase, and ``:``
characters not following a drive letter no longer cause an
:exc:`OSError` exce... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b48c5a3e-44a6-4f0f-a6dd-18b983038b70 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,226 | supabase-export-v2 | 83f0ab4dea9e1389 | the :attr:`~http.client.HTTPResponse.reason` attribute --- the reason phrase returned by server --- instead of the response headers as it is specified in the documentation for :class:`~http.client.HTTPResponse`.
For FTP, file, and data URLs, this function
returns a :class:`urllib.response.addinfourl` object. | trusted_official_docs | CPython Docs | the :attr:`~http.client.HTTPResponse.reason` attribute --- the reason phrase returned by server --- instead of the response headers as it is specified in the documentation for :class:`~http.client.HTTPResponse`.
For FTP, file, and data URLs, this function
returns a :class:`urllib.response.addinfourl` object. | the :attr:`~http.client.HTTPResponse.reason` attribute --- the reason phrase returned by server --- instead of the response headers as it is specified in the documentation for :class:`~http.client.HTTPResponse`.
For FTP, file, and data URLs, this function
returns a :class:`urllib.response.addinfourl` object. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b77b8655-f2c5-4ded-ba31-ecaf7dc06e0f | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,564 | supabase-export-v2 | 0c8779dbd59a9112 | As the python.org website uses *utf-8* encoding as specified in its meta tag, we will use the same for decoding the bytes object::
>>> with urllib.request.urlopen('http://www.python.org/') as f:
... print(f.read(100).decode('utf-8'))
... <!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 lt-ie7 lt-ie8 lt-ie9">... | trusted_official_docs | CPython Docs | As the python.org website uses *utf-8* encoding as specified in its meta tag, we will use the same for decoding the bytes object::
>>> with urllib.request.urlopen('http://www.python.org/') as f:
... print(f.read(100).decode('utf-8'))
... <!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 lt-ie7 lt-ie8 lt-ie9">... | As the python.org website uses *utf-8* encoding as specified in its meta tag, we will use the same for decoding the bytes object::
>>> with urllib.request.urlopen('http://www.python.org/') as f:
... print(f.read(100).decode('utf-8'))
... <!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 lt-ie7 lt-ie8 lt-ie9">... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b96ea164-8aa0-4aac-9e23-4758aaa930b3 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,451 | supabase-export-v2 | e89c58121580d069 | .. note::
The default implementation of this method does not strictly follow :rfc:`2616`,
which says that 301 and 302 responses to ``POST`` requests must not be
automatically redirected without confirmation by the user. In reality, browsers
do allow automatic redirection of these responses, changing the POST to a
`... | trusted_official_docs | CPython Docs | .. note::
The default implementation of this method does not strictly follow :rfc:`2616`,
which says that 301 and 302 responses to ``POST`` requests must not be
automatically redirected without confirmation by the user. In reality, browsers
do allow automatic redirection of these responses, changing the POST to a
`... | .. note::
The default implementation of this method does not strictly follow :rfc:`2616`,
which says that 301 and 302 responses to ``POST`` requests must not be
automatically redirected without confirmation by the user. In reality, browsers
do allow automatic redirection of these responses, changing the POST to a
`... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bbf499ed-8ee4-4033-9a41-1d49f7c97137 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,268 | supabase-export-v2 | d416d3575625b7cc | HTTP proxy in a CGI environment, either use ``ProxyHandler`` explicitly, or make sure the variable name is in lowercase (or at least the ``_proxy`` suffix).
The following classes are provided: | trusted_official_docs | CPython Docs | HTTP proxy in a CGI environment, either use ``ProxyHandler`` explicitly, or make sure the variable name is in lowercase (or at least the ``_proxy`` suffix).
The following classes are provided: | HTTP proxy in a CGI environment, either use ``ProxyHandler`` explicitly, or make sure the variable name is in lowercase (or at least the ``_proxy`` suffix).
The following classes are provided: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bd504c8a-558b-45f9-b588-b905640b9ad8 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,408 | supabase-export-v2 | 3861ad8a5d283c80 | BaseHandler Objects -------------------
:class:`BaseHandler` objects provide a couple of methods that are directly
useful, and others that are meant to be used by derived classes. These are
intended for direct use: | trusted_official_docs | CPython Docs | BaseHandler Objects -------------------
:class:`BaseHandler` objects provide a couple of methods that are directly
useful, and others that are meant to be used by derived classes. These are
intended for direct use: | BaseHandler Objects -------------------
:class:`BaseHandler` objects provide a couple of methods that are directly
useful, and others that are meant to be used by derived classes. These are
intended for direct use: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bdd5fda9-2263-41a8-85dd-293bd727e7b4 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,249 | supabase-export-v2 | c3e65e783e8a84f5 | If *add_scheme* is false (the default), the return value omits the ``file:`` scheme prefix. Set *add_scheme* to true to return a complete URL.
This example shows the function being used on Windows:: | trusted_official_docs | CPython Docs | If *add_scheme* is false (the default), the return value omits the ``file:`` scheme prefix. Set *add_scheme* to true to return a complete URL.
This example shows the function being used on Windows:: | If *add_scheme* is false (the default), the return value omits the ``file:`` scheme prefix. Set *add_scheme* to true to return a complete URL.
This example shows the function being used on Windows:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
be6faaa7-feeb-417f-b23a-ac2769b22301 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,279 | supabase-export-v2 | ce48337828ec848d | for an image in an HTML document, and the user had no option to approve the automatic fetching of the image, this should be true.
*method* should be a string that indicates the HTTP request method that
will be used (e.g. ``'HEAD'``). If provided, its value is stored in the
:attr:`~Request.method` attribute and is use... | trusted_official_docs | CPython Docs | for an image in an HTML document, and the user had no option to approve the automatic fetching of the image, this should be true.
*method* should be a string that indicates the HTTP request method that
will be used (e.g. ``'HEAD'``). If provided, its value is stored in the
:attr:`~Request.method` attribute and is use... | for an image in an HTML document, and the user had no option to approve the automatic fetching of the image, this should be true.
*method* should be a string that indicates the HTTP request method that
will be used (e.g. ``'HEAD'``). If provided, its value is stored in the
:attr:`~Request.method` attribute and is use... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bec6afc6-6286-409a-8e9f-e4687b4dc086 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,599 | supabase-export-v2 | c5bf4d62404c8096 | the file. The third argument may be ``-1`` on older FTP servers which do not return a file size in response to a retrieval request.
The following example illustrates the most common usage scenario:: | trusted_official_docs | CPython Docs | the file. The third argument may be ``-1`` on older FTP servers which do not return a file size in response to a retrieval request.
The following example illustrates the most common usage scenario:: | the file. The third argument may be ``-1`` on older FTP servers which do not return a file size in response to a retrieval request.
The following example illustrates the most common usage scenario:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bfd24a4e-5e58-4481-9e16-1b2feeac8978 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,357 | supabase-export-v2 | eb85a51dd70eb168 | .. method:: Request.get_method()
Return a string indicating the HTTP request method. If
:attr:`Request.method` is not ``None``, return its value, otherwise return
``'GET'`` if :attr:`Request.data` is ``None``, or ``'POST'`` if it's not. This is only meaningful for HTTP requests. | trusted_official_docs | CPython Docs | .. method:: Request.get_method()
Return a string indicating the HTTP request method. If
:attr:`Request.method` is not ``None``, return its value, otherwise return
``'GET'`` if :attr:`Request.data` is ``None``, or ``'POST'`` if it's not. This is only meaningful for HTTP requests. | .. method:: Request.get_method()
Return a string indicating the HTTP request method. If
:attr:`Request.method` is not ``None``, return its value, otherwise return
``'GET'`` if :attr:`Request.data` is ``None``, or ``'POST'`` if it's not. This is only meaningful for HTTP requests. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c36bdb58-2e1e-4078-886d-f5e195f875e2 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,432 | supabase-export-v2 | be15467fd27caef6 | error, as a string, #. the user-visible explanation of the code, as a string, and #. the headers of the error, as a mapping object.
Return values and exceptions raised should be the same as those of
:func:`urlopen`. | trusted_official_docs | CPython Docs | error, as a string, #. the user-visible explanation of the code, as a string, and #. the headers of the error, as a mapping object.
Return values and exceptions raised should be the same as those of
:func:`urlopen`. | error, as a string, #. the user-visible explanation of the code, as a string, and #. the headers of the error, as a mapping object.
Return values and exceptions raised should be the same as those of
:func:`urlopen`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cebcca35-0359-4823-bb9a-2f38dc254207 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,397 | supabase-export-v2 | 884014007b300dd4 | .. method:: OpenerDirector.error(proto, *args)
Handle an error of the given protocol. This will call the registered error
handlers for the given protocol with the given arguments (which are protocol
specific). The HTTP protocol is a special case which uses the HTTP response
code to determine the specific error handl... | trusted_official_docs | CPython Docs | .. method:: OpenerDirector.error(proto, *args)
Handle an error of the given protocol. This will call the registered error
handlers for the given protocol with the given arguments (which are protocol
specific). The HTTP protocol is a special case which uses the HTTP response
code to determine the specific error handl... | .. method:: OpenerDirector.error(proto, *args)
Handle an error of the given protocol. This will call the registered error
handlers for the given protocol with the given arguments (which are protocol
specific). The HTTP protocol is a special case which uses the HTTP response
code to determine the specific error handl... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ced822d0-ace3-41f1-b14a-b6b9c05242c8 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,278 | supabase-export-v2 | 1058f9fc4ae2ca1e | if the request is for an image in an HTML document, this should be the request-host of the request for the page containing the image.
*unverifiable* should indicate whether the request is unverifiable,
as defined by :rfc:`2965`. It defaults to ``False``. An unverifiable
request is one whose URL the user did not have ... | trusted_official_docs | CPython Docs | if the request is for an image in an HTML document, this should be the request-host of the request for the page containing the image.
*unverifiable* should indicate whether the request is unverifiable,
as defined by :rfc:`2965`. It defaults to ``False``. An unverifiable
request is one whose URL the user did not have ... | if the request is for an image in an HTML document, this should be the request-host of the request for the page containing the image.
*unverifiable* should indicate whether the request is unverifiable,
as defined by :rfc:`2965`. It defaults to ``False``. An unverifiable
request is one whose URL the user did not have ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cf4c9f4d-b923-452a-adda-a4e70a005b49 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,567 | supabase-export-v2 | 2180532640e187c9 | = urllib.request.urlopen('http://www.python.org/') >>> try: ... print(f.read(100).decode('utf-8')) ... finally: ... f.close() ... <!doctype html> <!--[if lt IE 7]> <html class="no-js ie6 lt-ie7 lt-ie8 lt-ie9"> <![endif]--> <!--
In the following example, we are sending a data-stream to the stdin of a CGI
and reading the... | trusted_official_docs | CPython Docs | = urllib.request.urlopen('http://www.python.org/') >>> try: ... print(f.read(100).decode('utf-8')) ... finally: ... f.close() ... <!doctype html> <!--[if lt IE 7]> <html class="no-js ie6 lt-ie7 lt-ie8 lt-ie9"> <![endif]--> <!--
In the following example, we are sending a data-stream to the stdin of a CGI
and reading the... | = urllib.request.urlopen('http://www.python.org/') >>> try: ... print(f.read(100).decode('utf-8')) ... finally: ... f.close() ... <!doctype html> <!--[if lt IE 7]> <html class="no-js ie6 lt-ie7 lt-ie8 lt-ie9"> <![endif]--> <!--
In the following example, we are sending a data-stream to the stdin of a CGI
and reading the... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cfca5122-9638-47da-a3df-d723db283150 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,478 | supabase-export-v2 | 4faba57246c8252b | Get user/password for given realm and URI, if any. This method will return ``(None, None)`` if there is no matching user/password.
For :class:`HTTPPasswordMgrWithDefaultRealm` objects, the realm ``None`` will be
searched if the given *realm* has no matching user/password. | trusted_official_docs | CPython Docs | Get user/password for given realm and URI, if any. This method will return ``(None, None)`` if there is no matching user/password.
For :class:`HTTPPasswordMgrWithDefaultRealm` objects, the realm ``None`` will be
searched if the given *realm* has no matching user/password. | Get user/password for given realm and URI, if any. This method will return ``(None, None)`` if there is no matching user/password.
For :class:`HTTPPasswordMgrWithDefaultRealm` objects, the realm ``None`` will be
searched if the given *realm* has no matching user/password. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d15c529e-f8d6-4396-bcd0-4f4cc725b750 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,604 | supabase-export-v2 | 2ec93eda665088cc | treated as a lower bound: if there's more data to read, urlretrieve reads more data, but if less data is available, it raises the exception.
You can still retrieve the downloaded data in this case, it is stored in the
:attr:`!content` attribute of the exception instance. | trusted_official_docs | CPython Docs | treated as a lower bound: if there's more data to read, urlretrieve reads more data, but if less data is available, it raises the exception.
You can still retrieve the downloaded data in this case, it is stored in the
:attr:`!content` attribute of the exception instance. | treated as a lower bound: if there's more data to read, urlretrieve reads more data, but if less data is available, it raises the exception.
You can still retrieve the downloaded data in this case, it is stored in the
:attr:`!content` attribute of the exception instance. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d25583f0-7eed-4bd7-9081-04b3fffeec32 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,253 | supabase-export-v2 | f31012615f3d0da9 | versionchanged:: 3.14 Paths beginning with a slash are converted to URLs with authority sections. For example, the path ``/etc/hosts`` is converted to the URL ``///etc/hosts``.
.. versionchanged:: 3.14
The *add_scheme* parameter was added. | trusted_official_docs | CPython Docs | versionchanged:: 3.14 Paths beginning with a slash are converted to URLs with authority sections. For example, the path ``/etc/hosts`` is converted to the URL ``///etc/hosts``.
.. versionchanged:: 3.14
The *add_scheme* parameter was added. | versionchanged:: 3.14 Paths beginning with a slash are converted to URLs with authority sections. For example, the path ``/etc/hosts`` is converted to the URL ``///etc/hosts``.
.. versionchanged:: 3.14
The *add_scheme* parameter was added. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d54488e9-a1a9-467b-b419-fb32c4336ca3 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,578 | supabase-export-v2 | c4c6f3ac9268c910 | proxy_handler = urllib.request.ProxyHandler({'http': 'http://www.example.com:3128/'}) proxy_auth_handler = urllib.request.ProxyBasicAuthHandler() proxy_auth_handler.add_password('realm', 'host', 'username', 'password')
opener = urllib.request.build_opener(proxy_handler, proxy_auth_handler)
# This time, rather than ins... | trusted_official_docs | CPython Docs | proxy_handler = urllib.request.ProxyHandler({'http': 'http://www.example.com:3128/'}) proxy_auth_handler = urllib.request.ProxyBasicAuthHandler() proxy_auth_handler.add_password('realm', 'host', 'username', 'password')
opener = urllib.request.build_opener(proxy_handler, proxy_auth_handler)
# This time, rather than ins... | proxy_handler = urllib.request.ProxyHandler({'http': 'http://www.example.com:3128/'}) proxy_auth_handler = urllib.request.ProxyBasicAuthHandler() proxy_auth_handler.add_password('realm', 'host', 'username', 'password')
opener = urllib.request.build_opener(proxy_handler, proxy_auth_handler)
# This time, rather than ins... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d728e4cd-4660-4a5e-b528-8c6876437f56 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,426 | supabase-export-v2 | 7e1558869698ddc5 | .. method:: BaseHandler.unknown_open(req)
This method is *not* defined in :class:`BaseHandler`, but subclasses should
define it if they want to catch all URLs with no specific registered handler to
open it. | trusted_official_docs | CPython Docs | .. method:: BaseHandler.unknown_open(req)
This method is *not* defined in :class:`BaseHandler`, but subclasses should
define it if they want to catch all URLs with no specific registered handler to
open it. | .. method:: BaseHandler.unknown_open(req)
This method is *not* defined in :class:`BaseHandler`, but subclasses should
define it if they want to catch all URLs with no specific registered handler to
open it. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d7765e8a-aaa1-4cbf-b32e-25a8f87c75cd | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,262 | supabase-export-v2 | ad84d2e9e265baf6 | if the authority isn't empty or ``localhost``, then on Windows a UNC path is returned (as before), and on other platforms a :exc:`~urllib.error.URLError` is raised.
.. versionchanged:: 3.14
The URL query and fragment components are discarded if present. | trusted_official_docs | CPython Docs | if the authority isn't empty or ``localhost``, then on Windows a UNC path is returned (as before), and on other platforms a :exc:`~urllib.error.URLError` is raised.
.. versionchanged:: 3.14
The URL query and fragment components are discarded if present. | if the authority isn't empty or ``localhost``, then on Windows a UNC path is returned (as before), and on other platforms a :exc:`~urllib.error.URLError` is raised.
.. versionchanged:: 3.14
The URL query and fragment components are discarded if present. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d979c4d4-adb5-4353-836c-e6c88451bdc2 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,470 | supabase-export-v2 | 573bcdf31c720bc7 | .. method:: ProxyHandler.<protocol>_open(request) :noindex:
The :class:`ProxyHandler` will have a method :meth:`!<protocol>_open` for every
*protocol* which has a proxy in the *proxies* dictionary given in the
constructor. The method will modify requests to go through the proxy, by
calling ``request.set_proxy()``, a... | trusted_official_docs | CPython Docs | .. method:: ProxyHandler.<protocol>_open(request) :noindex:
The :class:`ProxyHandler` will have a method :meth:`!<protocol>_open` for every
*protocol* which has a proxy in the *proxies* dictionary given in the
constructor. The method will modify requests to go through the proxy, by
calling ``request.set_proxy()``, a... | .. method:: ProxyHandler.<protocol>_open(request) :noindex:
The :class:`ProxyHandler` will have a method :meth:`!<protocol>_open` for every
*protocol* which has a proxy in the *proxies* dictionary given in the
constructor. The method will modify requests to go through the proxy, by
calling ``request.set_proxy()``, a... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
da5d42d7-761a-4b5a-bb7c-cbebeec8ab45 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,506 | supabase-export-v2 | 75eec9ec2c75a70b | .. method:: AbstractDigestAuthHandler.http_error_auth_reqed(authreq, host, req, headers)
*authreq* should be the name of the header where the information about the realm
is included in the request, *host* should be the host to authenticate to, *req*
should be the (failed) :class:`Request` object, and *headers* should... | trusted_official_docs | CPython Docs | .. method:: AbstractDigestAuthHandler.http_error_auth_reqed(authreq, host, req, headers)
*authreq* should be the name of the header where the information about the realm
is included in the request, *host* should be the host to authenticate to, *req*
should be the (failed) :class:`Request` object, and *headers* should... | .. method:: AbstractDigestAuthHandler.http_error_auth_reqed(authreq, host, req, headers)
*authreq* should be the name of the header where the information about the realm
is included in the request, *host* should be the host to authenticate to, *req*
should be the (failed) :class:`Request` object, and *headers* should... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dbcc5c88-146f-4003-bc30-3b0db4798838 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,576 | supabase-export-v2 | aad551d3be564920 | environment variables named ``<scheme>_proxy``, where ``<scheme>`` is the URL scheme involved. For example, the :envvar:`!http_proxy` environment variable is read to obtain the HTTP proxy's URL.
This example replaces the default :class:`ProxyHandler` with one that uses
programmatically supplied proxy URLs, and adds pro... | trusted_official_docs | CPython Docs | environment variables named ``<scheme>_proxy``, where ``<scheme>`` is the URL scheme involved. For example, the :envvar:`!http_proxy` environment variable is read to obtain the HTTP proxy's URL.
This example replaces the default :class:`ProxyHandler` with one that uses
programmatically supplied proxy URLs, and adds pro... | environment variables named ``<scheme>_proxy``, where ``<scheme>`` is the URL scheme involved. For example, the :envvar:`!http_proxy` environment variable is read to obtain the HTTP proxy's URL.
This example replaces the default :class:`ProxyHandler` with one that uses
programmatically supplied proxy URLs, and adds pro... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dd94b64e-500f-47d3-902d-e5a48f2a2cb2 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,614 | supabase-export-v2 | e9737d2e18666cf7 | * There should be a function to query whether a particular URL is in the cache.
* For backward compatibility, if a URL appears to point to a local file but the
file can't be opened, the URL is re-interpreted using the FTP protocol. This
can sometimes cause confusing error messages. | trusted_official_docs | CPython Docs | * There should be a function to query whether a particular URL is in the cache.
* For backward compatibility, if a URL appears to point to a local file but the
file can't be opened, the URL is re-interpreted using the FTP protocol. This
can sometimes cause confusing error messages. | * There should be a function to query whether a particular URL is in the cache.
* For backward compatibility, if a URL appears to point to a local file but the
file can't be opened, the URL is re-interpreted using the FTP protocol. This
can sometimes cause confusing error messages. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dfabd7ae-771f-4d94-bc21-68f17493a8c8 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,310 | supabase-export-v2 | f326780b9686fcf9 | to set ``is_authenticated`` ``True`` for the URI, so that subsequent requests to the URI or any of its super-URIs will automatically include the authentication credentials.
.. versionadded:: 3.5
Added ``is_authenticated`` support. | trusted_official_docs | CPython Docs | to set ``is_authenticated`` ``True`` for the URI, so that subsequent requests to the URI or any of its super-URIs will automatically include the authentication credentials.
.. versionadded:: 3.5
Added ``is_authenticated`` support. | to set ``is_authenticated`` ``True`` for the URI, so that subsequent requests to the URI or any of its super-URIs will automatically include the authentication credentials.
.. versionadded:: 3.5
Added ``is_authenticated`` support. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e01dcd7e-e35a-4069-8068-b9651d46dd3d | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,584 | supabase-export-v2 | a163708914cf4e02 | import urllib.request opener = urllib.request.build_opener() opener.addheaders = [('User-agent', 'Mozilla/5.0')] with opener.open('http://www.example.com/') as f: print(f.read().decode('utf-8'))
Also, remember that a few standard headers (:mailheader:`Content-Length`,
:mailheader:`Content-Type` and :mailheader:`Host`)
... | trusted_official_docs | CPython Docs | import urllib.request opener = urllib.request.build_opener() opener.addheaders = [('User-agent', 'Mozilla/5.0')] with opener.open('http://www.example.com/') as f: print(f.read().decode('utf-8'))
Also, remember that a few standard headers (:mailheader:`Content-Length`,
:mailheader:`Content-Type` and :mailheader:`Host`)
... | import urllib.request opener = urllib.request.build_opener() opener.addheaders = [('User-agent', 'Mozilla/5.0')] with opener.open('http://www.example.com/') as f: print(f.read().decode('utf-8'))
Also, remember that a few standard headers (:mailheader:`Content-Length`,
:mailheader:`Content-Type` and :mailheader:`Host`)
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e2499d45-b0ad-4385-badb-0a0382bca381 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,598 | supabase-export-v2 | b36dc539f7304c32 | and *headers* is whatever the :meth:`!info` method of the object returned by :func:`urlopen` returned (for a remote object). Exceptions are the same as for :func:`urlopen`.
The second argument, if present, specifies the file location to copy to (if
absent, the location will be a tempfile with a generated name). The th... | trusted_official_docs | CPython Docs | and *headers* is whatever the :meth:`!info` method of the object returned by :func:`urlopen` returned (for a remote object). Exceptions are the same as for :func:`urlopen`.
The second argument, if present, specifies the file location to copy to (if
absent, the location will be a tempfile with a generated name). The th... | and *headers* is whatever the :meth:`!info` method of the object returned by :func:`urlopen` returned (for a remote object). Exceptions are the same as for :func:`urlopen`.
The second argument, if present, specifies the file location to copy to (if
absent, the location will be a tempfile with a generated name). The th... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e2701467-a319-4bde-9704-836a21a7fb07 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,447 | supabase-export-v2 | 3d7fa15cca171e09 | this module's client code. If this is the case, :exc:`~urllib.error.HTTPError` is raised. See :rfc:`2616` for details of the precise meanings of the various redirection codes.
An :exc:`~urllib.error.HTTPError` exception raised as a security consideration if the
HTTPRedirectHandler is presented with a redirected URL wh... | trusted_official_docs | CPython Docs | this module's client code. If this is the case, :exc:`~urllib.error.HTTPError` is raised. See :rfc:`2616` for details of the precise meanings of the various redirection codes.
An :exc:`~urllib.error.HTTPError` exception raised as a security consideration if the
HTTPRedirectHandler is presented with a redirected URL wh... | this module's client code. If this is the case, :exc:`~urllib.error.HTTPError` is raised. See :rfc:`2616` for details of the precise meanings of the various redirection codes.
An :exc:`~urllib.error.HTTPError` exception raised as a security consideration if the
HTTPRedirectHandler is presented with a redirected URL wh... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e2f48997-555d-47cb-8f09-11067f08abaf | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,590 | supabase-export-v2 | 1ccf963fe339728d | >>> import urllib.parse >>> data = urllib.parse.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0}) >>> data = data.encode('ascii') >>> with urllib.request.urlopen("http://requestb.in/xrbl82xr", data) as f: ... print(f.read().decode('utf-8')) ...
The following example uses an explicitly specified HTTP proxy, overriding
envir... | trusted_official_docs | CPython Docs | >>> import urllib.parse >>> data = urllib.parse.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0}) >>> data = data.encode('ascii') >>> with urllib.request.urlopen("http://requestb.in/xrbl82xr", data) as f: ... print(f.read().decode('utf-8')) ...
The following example uses an explicitly specified HTTP proxy, overriding
envir... | >>> import urllib.parse >>> data = urllib.parse.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0}) >>> data = data.encode('ascii') >>> with urllib.request.urlopen("http://requestb.in/xrbl82xr", data) as f: ... print(f.read().decode('utf-8')) ...
The following example uses an explicitly specified HTTP proxy, overriding
envir... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e40f3045-e8a6-4501-8ac3-aa446c1baa88 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,493 | supabase-export-v2 | 314d3ed1ebd92834 | .. method:: AbstractBasicAuthHandler.http_error_auth_reqed(authreq, host, req, headers)
Handle an authentication request by getting a user/password pair, and re-trying
the request. *authreq* should be the name of the header where the information
about the realm is included in the request, *host* specifies the URL and... | trusted_official_docs | CPython Docs | .. method:: AbstractBasicAuthHandler.http_error_auth_reqed(authreq, host, req, headers)
Handle an authentication request by getting a user/password pair, and re-trying
the request. *authreq* should be the name of the header where the information
about the realm is included in the request, *host* specifies the URL and... | .. method:: AbstractBasicAuthHandler.http_error_auth_reqed(authreq, host, req, headers)
Handle an authentication request by getting a user/password pair, and re-trying
the request. *authreq* should be the name of the header where the information
about the realm is included in the request, *host* specifies the URL and... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e600223c-6ab5-4fc4-ae92-d5a3847f4518 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,360 | supabase-export-v2 | fdbc73875677d8c2 | .. method:: Request.add_header(key, val)
Add another header to the request. Headers are currently ignored by all
handlers except HTTP handlers, where they are added to the list of headers sent
to the server. Note that there cannot be more than one header with the same
name, and later calls will overwrite previous ca... | trusted_official_docs | CPython Docs | .. method:: Request.add_header(key, val)
Add another header to the request. Headers are currently ignored by all
handlers except HTTP handlers, where they are added to the list of headers sent
to the server. Note that there cannot be more than one header with the same
name, and later calls will overwrite previous ca... | .. method:: Request.add_header(key, val)
Add another header to the request. Headers are currently ignored by all
handlers except HTTP handlers, where they are added to the list of headers sent
to the server. Note that there cannot be more than one header with the same
name, and later calls will overwrite previous ca... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ee45e407-65b9-47d5-a518-7bb136791f32 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,257 | supabase-export-v2 | 710a85cf74397499 | omit a ``file:`` scheme prefix. If *require_scheme* is set to true, the given value should include the prefix; a :exc:`~urllib.error.URLError` is raised if it doesn't.
The URL authority is discarded if it is empty, ``localhost``, or the local
hostname. Otherwise, if *resolve_host* is set to true, the authority is
res... | trusted_official_docs | CPython Docs | omit a ``file:`` scheme prefix. If *require_scheme* is set to true, the given value should include the prefix; a :exc:`~urllib.error.URLError` is raised if it doesn't.
The URL authority is discarded if it is empty, ``localhost``, or the local
hostname. Otherwise, if *resolve_host* is set to true, the authority is
res... | omit a ``file:`` scheme prefix. If *require_scheme* is set to true, the given value should include the prefix; a :exc:`~urllib.error.URLError` is raised if it doesn't.
The URL authority is discarded if it is empty, ``localhost``, or the local
hostname. Otherwise, if *resolve_host* is set to true, the authority is
res... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ef95bba2-4b05-46e1-9386-cc3e3d0c2496 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,449 | supabase-export-v2 | 8d8e4f63450ecc4d | .. method:: HTTPRedirectHandler.redirect_request(req, fp, code, msg, hdrs, newurl)
Return a :class:`Request` or ``None`` in response to a redirect. This is called
by the default implementations of the :meth:`!http_error_30\*` methods when a
redirection is received from the server. If a redirection should take place,
... | trusted_official_docs | CPython Docs | .. method:: HTTPRedirectHandler.redirect_request(req, fp, code, msg, hdrs, newurl)
Return a :class:`Request` or ``None`` in response to a redirect. This is called
by the default implementations of the :meth:`!http_error_30\*` methods when a
redirection is received from the server. If a redirection should take place,
... | .. method:: HTTPRedirectHandler.redirect_request(req, fp, code, msg, hdrs, newurl)
Return a :class:`Request` or ``None`` in response to a redirect. This is called
by the default implementations of the :meth:`!http_error_30\*` methods when a
redirection is received from the server. If a redirection should take place,
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
efddd371-cc46-4a06-820d-2c2e81f02809 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,424 | supabase-export-v2 | c7005198b21d1daf | This method is *not* defined in :class:`BaseHandler`, but subclasses should define it if they want to handle URLs with the given protocol.
This method, if defined, will be called by the parent :class:`OpenerDirector`. Return values should be the same as for :meth:`~BaseHandler.default_open`. | trusted_official_docs | CPython Docs | This method is *not* defined in :class:`BaseHandler`, but subclasses should define it if they want to handle URLs with the given protocol.
This method, if defined, will be called by the parent :class:`OpenerDirector`. Return values should be the same as for :meth:`~BaseHandler.default_open`. | This method is *not* defined in :class:`BaseHandler`, but subclasses should define it if they want to handle URLs with the given protocol.
This method, if defined, will be called by the parent :class:`OpenerDirector`. Return values should be the same as for :meth:`~BaseHandler.default_open`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f0f2e9e7-9603-467b-bf59-8b2c27ea140e | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,589 | supabase-export-v2 | 73a4854a72a87a18 | following example uses the ``POST`` method instead. Note that params output from urlencode is encoded to bytes before it is sent to urlopen as data::
>>> import urllib.request
>>> import urllib.parse
>>> data = urllib.parse.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0})
>>> data = data.encode('ascii')
>>> with urlli... | trusted_official_docs | CPython Docs | following example uses the ``POST`` method instead. Note that params output from urlencode is encoded to bytes before it is sent to urlopen as data::
>>> import urllib.request
>>> import urllib.parse
>>> data = urllib.parse.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0})
>>> data = data.encode('ascii')
>>> with urlli... | following example uses the ``POST`` method instead. Note that params output from urlencode is encoded to bytes before it is sent to urlopen as data::
>>> import urllib.request
>>> import urllib.parse
>>> data = urllib.parse.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0})
>>> data = data.encode('ascii')
>>> with urlli... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f5eff1ae-3385-4018-9455-245710a7dd27 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,559 | supabase-export-v2 | 045db7c353f02af1 | This example gets the python.org main page and displays the first 300 bytes of it::
>>> import urllib.request
>>> with urllib.request.urlopen('http://www.python.org/') as f:
... print(f.read(300))
... b'<!doctype html>\n<!--[if lt IE 7]> <html class="no-js ie6 lt-ie7 lt-ie8 lt-ie9"> <![endif]-->\n<!--[if IE 7]> <htm... | trusted_official_docs | CPython Docs | This example gets the python.org main page and displays the first 300 bytes of it::
>>> import urllib.request
>>> with urllib.request.urlopen('http://www.python.org/') as f:
... print(f.read(300))
... b'<!doctype html>\n<!--[if lt IE 7]> <html class="no-js ie6 lt-ie7 lt-ie8 lt-ie9"> <![endif]-->\n<!--[if IE 7]> <htm... | This example gets the python.org main page and displays the first 300 bytes of it::
>>> import urllib.request
>>> with urllib.request.urlopen('http://www.python.org/') as f:
... print(f.read(300))
... b'<!doctype html>\n<!--[if lt IE 7]> <html class="no-js ie6 lt-ie7 lt-ie8 lt-ie9"> <![endif]-->\n<!--[if IE 7]> <htm... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f61b02ad-74de-4edb-83f1-14b48bcf1ab2 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,274 | supabase-export-v2 | 2c4b791c3babe216 | or sequence of 2-tuples and returns an ASCII string in this format. It should be encoded to bytes before being used as the *data* parameter.
*headers* should be a dictionary, and will be treated as if
:meth:`add_header` was called with each key and value as arguments. This is often used to "spoof" the ``User-Agent`` h... | trusted_official_docs | CPython Docs | or sequence of 2-tuples and returns an ASCII string in this format. It should be encoded to bytes before being used as the *data* parameter.
*headers* should be a dictionary, and will be treated as if
:meth:`add_header` was called with each key and value as arguments. This is often used to "spoof" the ``User-Agent`` h... | or sequence of 2-tuples and returns an ASCII string in this format. It should be encoded to bytes before being used as the *data* parameter.
*headers* should be a dictionary, and will be treated as if
:meth:`add_header` was called with each key and value as arguments. This is often used to "spoof" the ``User-Agent`` h... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f6aa19eb-f6fa-4f64-96e9-574ce4f4c471 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,587 | supabase-export-v2 | eb0f985de157eafb | Here is an example session that uses the ``GET`` method to retrieve a URL containing parameters::
>>> import urllib.request
>>> import urllib.parse
>>> params = urllib.parse.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0})
>>> url = "http://www.musi-cal.com/cgi-bin/query?%s" % params
>>> with urllib.request.urlopen(ur... | trusted_official_docs | CPython Docs | Here is an example session that uses the ``GET`` method to retrieve a URL containing parameters::
>>> import urllib.request
>>> import urllib.parse
>>> params = urllib.parse.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0})
>>> url = "http://www.musi-cal.com/cgi-bin/query?%s" % params
>>> with urllib.request.urlopen(ur... | Here is an example session that uses the ``GET`` method to retrieve a URL containing parameters::
>>> import urllib.request
>>> import urllib.parse
>>> params = urllib.parse.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0})
>>> url = "http://www.musi-cal.com/cgi-bin/query?%s" % params
>>> with urllib.request.urlopen(ur... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f7aed320-4b6a-4b87-99b5-ceef3214e13f | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,494 | supabase-export-v2 | b0981b7d95bb568c | the request, *host* specifies the URL and path to authenticate for, *req* should be the (failed) :class:`Request` object, and *headers* should be the error headers.
*host* is either an authority (e.g. ``"python.org"``) or a URL containing an
authority component (e.g. ``"http://python.org/"``). In either case, the
aut... | trusted_official_docs | CPython Docs | the request, *host* specifies the URL and path to authenticate for, *req* should be the (failed) :class:`Request` object, and *headers* should be the error headers.
*host* is either an authority (e.g. ``"python.org"``) or a URL containing an
authority component (e.g. ``"http://python.org/"``). In either case, the
aut... | the request, *host* specifies the URL and path to authenticate for, *req* should be the (failed) :class:`Request` object, and *headers* should be the error headers.
*host* is either an authority (e.g. ``"python.org"``) or a URL containing an
authority component (e.g. ``"http://python.org/"``). In either case, the
aut... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fa60c62d-e971-4f9a-8f8c-ac93b2761e96 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,378 | supabase-export-v2 | de2c3d2d192ec361 | Return a list of tuples (header_name, header_value) of the Request headers.
.. versionchanged:: 3.4
The request methods add_data, has_data, get_data, get_type, get_host,
get_selector, get_origin_req_host and is_unverifiable that were deprecated
since 3.3 have been removed. | trusted_official_docs | CPython Docs | Return a list of tuples (header_name, header_value) of the Request headers.
.. versionchanged:: 3.4
The request methods add_data, has_data, get_data, get_type, get_host,
get_selector, get_origin_req_host and is_unverifiable that were deprecated
since 3.3 have been removed. | Return a list of tuples (header_name, header_value) of the Request headers.
.. versionchanged:: 3.4
The request methods add_data, has_data, get_data, get_type, get_host,
get_selector, get_origin_req_host and is_unverifiable that were deprecated
since 3.3 have been removed. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fac705c2-a1bf-4c45-bd74-93943e0d28e7 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,317 | supabase-export-v2 | 9a0ed8d33be5770b | proxy. *password_mgr*, if given, should be something that is compatible with :class:`HTTPPasswordMgr`; refer to section :ref:`http-password-mgr` for information on the interface that must be supported.
.. versionchanged:: 3.14
Added support for HTTP digest authentication algorithm ``SHA-256``. | trusted_official_docs | CPython Docs | proxy. *password_mgr*, if given, should be something that is compatible with :class:`HTTPPasswordMgr`; refer to section :ref:`http-password-mgr` for information on the interface that must be supported.
.. versionchanged:: 3.14
Added support for HTTP digest authentication algorithm ``SHA-256``. | proxy. *password_mgr*, if given, should be something that is compatible with :class:`HTTPPasswordMgr`; refer to section :ref:`http-password-mgr` for information on the interface that must be supported.
.. versionchanged:: 3.14
Added support for HTTP digest authentication algorithm ``SHA-256``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fba20324-64d0-4790-b0a2-857e8d914607 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,616 | supabase-export-v2 | ac260af1fdfca5af | a network connection to be set up. This means that it is difficult to build an interactive web client using these functions without using threads.
.. index::
single: HTML
pair: HTTP; protocol | trusted_official_docs | CPython Docs | a network connection to be set up. This means that it is difficult to build an interactive web client using these functions without using threads.
.. index::
single: HTML
pair: HTTP; protocol | a network connection to be set up. This means that it is difficult to build an interactive web client using these functions without using threads.
.. index::
single: HTML
pair: HTTP; protocol | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fd6195b6-e4c6-4c0f-b33d-e09caf1bddb2 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,452 | supabase-export-v2 | ef8335926226d5dd | the user. In reality, browsers do allow automatic redirection of these responses, changing the POST to a ``GET``, and the default implementation reproduces this behavior.
.. method:: HTTPRedirectHandler.http_error_301(req, fp, code, msg, hdrs) | trusted_official_docs | CPython Docs | the user. In reality, browsers do allow automatic redirection of these responses, changing the POST to a ``GET``, and the default implementation reproduces this behavior.
.. method:: HTTPRedirectHandler.http_error_301(req, fp, code, msg, hdrs) | the user. In reality, browsers do allow automatic redirection of these responses, changing the POST to a ``GET``, and the default implementation reproduces this behavior.
.. method:: HTTPRedirectHandler.http_error_301(req, fp, code, msg, hdrs) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
feda2945-9fef-44b1-8811-58b0daf30231 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,596 | supabase-export-v2 | b69347c1fb31361d | functions and classes are ported from the Python 2 module ``urllib`` (as opposed to ``urllib2``). They might become deprecated at some point in the future.
.. function:: urlretrieve(url, filename=None, reporthook=None, data=None) | trusted_official_docs | CPython Docs | functions and classes are ported from the Python 2 module ``urllib`` (as opposed to ``urllib2``). They might become deprecated at some point in the future.
.. function:: urlretrieve(url, filename=None, reporthook=None, data=None) | functions and classes are ported from the Python 2 module ``urllib`` (as opposed to ``urllib2``). They might become deprecated at some point in the future.
.. function:: urlretrieve(url, filename=None, reporthook=None, data=None) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ff97c2ff-02a5-47af-9152-af76ecbe5317 | CPython Docs | file://datasets/cpython/Doc/library/urllib.request.rst | unknown | 084996aa-b93f-4bc6-b685-d2a7d483f970 | 37,314 | supabase-export-v2 | 6e545de8157213ba | .. class:: ProxyBasicAuthHandler(password_mgr=None)
Handle authentication with the proxy. *password_mgr*, if given, should be
something that is compatible with :class:`HTTPPasswordMgr`; refer to section
:ref:`http-password-mgr` for information on the interface that must be
supported. | trusted_official_docs | CPython Docs | .. class:: ProxyBasicAuthHandler(password_mgr=None)
Handle authentication with the proxy. *password_mgr*, if given, should be
something that is compatible with :class:`HTTPPasswordMgr`; refer to section
:ref:`http-password-mgr` for information on the interface that must be
supported. | .. class:: ProxyBasicAuthHandler(password_mgr=None)
Handle authentication with the proxy. *password_mgr*, if given, should be
something that is compatible with :class:`HTTPPasswordMgr`; refer to section
:ref:`http-password-mgr` for information on the interface that must be
supported. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
04bad232-1084-4a4a-a1ec-0f3e7185ce05 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.messagebox.rst | unknown | e8be3db7-fa2b-4ff0-b102-73eae98c6437 | 37,642 | supabase-export-v2 | 8a4082cb3140648d | --------------
The :mod:`!tkinter.messagebox` module provides a template base class as well as
a variety of convenience methods for commonly used configurations. The message
boxes are modal and will return a subset of (``True``, ``False``, ``None``,
:data:`OK`, :data:`CANCEL`, :data:`YES`, :data:`NO`) based on
the user... | trusted_official_docs | CPython Docs | --------------
The :mod:`!tkinter.messagebox` module provides a template base class as well as
a variety of convenience methods for commonly used configurations. The message
boxes are modal and will return a subset of (``True``, ``False``, ``None``,
:data:`OK`, :data:`CANCEL`, :data:`YES`, :data:`NO`) based on
the user... | --------------
The :mod:`!tkinter.messagebox` module provides a template base class as well as
a variety of convenience methods for commonly used configurations. The message
boxes are modal and will return a subset of (``True``, ``False``, ``None``,
:data:`OK`, :data:`CANCEL`, :data:`YES`, :data:`NO`) based on
the user... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
05b57e85-4c46-4735-a317-2bc41f71954f | CPython Docs | file://datasets/cpython/Doc/library/tkinter.messagebox.rst | unknown | e8be3db7-fa2b-4ff0-b102-73eae98c6437 | 37,653 | supabase-export-v2 | 83fc3ed0557d7f9d | *parent* Makes the specified window the logical parent of the message box. The message box is displayed on top of its parent window.
*title*
Specifies a string to display as the title of the message box. This option is ignored on macOS, where platform guidelines forbid
the use of a title on this kind of dialog. | trusted_official_docs | CPython Docs | *parent* Makes the specified window the logical parent of the message box. The message box is displayed on top of its parent window.
*title*
Specifies a string to display as the title of the message box. This option is ignored on macOS, where platform guidelines forbid
the use of a title on this kind of dialog. | *parent* Makes the specified window the logical parent of the message box. The message box is displayed on top of its parent window.
*title*
Specifies a string to display as the title of the message box. This option is ignored on macOS, where platform guidelines forbid
the use of a title on this kind of dialog. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
195c45fe-a228-443f-bc90-e3ac1c09a7b0 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.messagebox.rst | unknown | e8be3db7-fa2b-4ff0-b102-73eae98c6437 | 37,649 | supabase-export-v2 | 04e6b1007dbbfe86 | this message window (:data:`OK`, :data:`CANCEL`, and so on). If this option is not specified, the first button in the dialog will be made the default.
*detail*
Specifies an auxiliary message to the main message given by the
*message* option. The message detail will be presented beneath the main message and,
where su... | trusted_official_docs | CPython Docs | this message window (:data:`OK`, :data:`CANCEL`, and so on). If this option is not specified, the first button in the dialog will be made the default.
*detail*
Specifies an auxiliary message to the main message given by the
*message* option. The message detail will be presented beneath the main message and,
where su... | this message window (:data:`OK`, :data:`CANCEL`, and so on). If this option is not specified, the first button in the dialog will be made the default.
*detail*
Specifies an auxiliary message to the main message given by the
*message* option. The message detail will be presented beneath the main message and,
where su... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
630e9a29-d733-401f-94d3-046919595499 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.messagebox.rst | unknown | e8be3db7-fa2b-4ff0-b102-73eae98c6437 | 37,647 | supabase-export-v2 | 5549303a69ddbff4 | The following options are supported:
*command*
Specifies the function to invoke when the user closes the dialog. The name of the button clicked by the user to close the dialog is
passed as argument. This is only available on macOS. | trusted_official_docs | CPython Docs | The following options are supported:
*command*
Specifies the function to invoke when the user closes the dialog. The name of the button clicked by the user to close the dialog is
passed as argument. This is only available on macOS. | The following options are supported:
*command*
Specifies the function to invoke when the user closes the dialog. The name of the button clicked by the user to close the dialog is
passed as argument. This is only available on macOS. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6d427339-e53c-4157-959e-c0489018b082 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.messagebox.rst | unknown | e8be3db7-fa2b-4ff0-b102-73eae98c6437 | 37,645 | supabase-export-v2 | 186d329526660313 | .. class:: Message(master=None, **options)
Create a message window with an application-specified message, an icon
and a set of buttons. Each of the buttons in the message window is identified by a unique symbolic name (see the *type* options). | trusted_official_docs | CPython Docs | .. class:: Message(master=None, **options)
Create a message window with an application-specified message, an icon
and a set of buttons. Each of the buttons in the message window is identified by a unique symbolic name (see the *type* options). | .. class:: Message(master=None, **options)
Create a message window with an application-specified message, an icon
and a set of buttons. Each of the buttons in the message window is identified by a unique symbolic name (see the *type* options). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ac6b09ce-45fd-4452-a5fc-66795247504a | CPython Docs | file://datasets/cpython/Doc/library/tkinter.messagebox.rst | unknown | e8be3db7-fa2b-4ff0-b102-73eae98c6437 | 37,646 | supabase-export-v2 | 31090bf08441f17b | icon and a set of buttons. Each of the buttons in the message window is identified by a unique symbolic name (see the *type* options).
The following options are supported: | trusted_official_docs | CPython Docs | icon and a set of buttons. Each of the buttons in the message window is identified by a unique symbolic name (see the *type* options).
The following options are supported: | icon and a set of buttons. Each of the buttons in the message window is identified by a unique symbolic name (see the *type* options).
The following options are supported: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c8a0e9c0-34c4-4274-9354-30d22c231ddb | CPython Docs | file://datasets/cpython/Doc/library/tkinter.messagebox.rst | unknown | e8be3db7-fa2b-4ff0-b102-73eae98c6437 | 37,678 | supabase-export-v2 | 27c68a58e2dd75e3 | Symbolic names of buttons:
.. data:: ABORT
:value: 'abort'
.. data:: RETRY
:value: 'retry'
.. data:: IGNORE
:value: 'ignore'
.. data:: OK
:value: 'ok'
.. data:: CANCEL
:value: 'cancel'
.. data:: YES
:value: 'yes'
.. data:: NO
:value: 'no' | trusted_official_docs | CPython Docs | Symbolic names of buttons:
.. data:: ABORT
:value: 'abort'
.. data:: RETRY
:value: 'retry'
.. data:: IGNORE
:value: 'ignore'
.. data:: OK
:value: 'ok'
.. data:: CANCEL
:value: 'cancel'
.. data:: YES
:value: 'yes'
.. data:: NO
:value: 'no' | Symbolic names of buttons:
.. data:: ABORT
:value: 'abort'
.. data:: RETRY
:value: 'retry'
.. data:: IGNORE
:value: 'ignore'
.. data:: OK
:value: 'ok'
.. data:: CANCEL
:value: 'cancel'
.. data:: YES
:value: 'yes'
.. data:: NO
:value: 'no' | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cb0286d7-9bbc-4a97-861d-d185f3ef20f9 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.messagebox.rst | unknown | e8be3db7-fa2b-4ff0-b102-73eae98c6437 | 37,654 | supabase-export-v2 | 570ea2eb33b93f4e | title of the message box. This option is ignored on macOS, where platform guidelines forbid the use of a title on this kind of dialog.
*type*
Arranges for a :ref:`predefined set of buttons <messagebox-types>`
to be displayed. | trusted_official_docs | CPython Docs | title of the message box. This option is ignored on macOS, where platform guidelines forbid the use of a title on this kind of dialog.
*type*
Arranges for a :ref:`predefined set of buttons <messagebox-types>`
to be displayed. | title of the message box. This option is ignored on macOS, where platform guidelines forbid the use of a title on this kind of dialog.
*type*
Arranges for a :ref:`predefined set of buttons <messagebox-types>`
to be displayed. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d5d9003e-0865-4e81-a508-058e4b770102 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.messagebox.rst | unknown | e8be3db7-fa2b-4ff0-b102-73eae98c6437 | 37,648 | supabase-export-v2 | 18a3a2789e726c7f | the dialog. The name of the button clicked by the user to close the dialog is passed as argument. This is only available on macOS.
*default*
Gives the :ref:`symbolic name <messagebox-buttons>` of the default button
for this message window (:data:`OK`, :data:`CANCEL`, and so on). If this option is not specified, the f... | trusted_official_docs | CPython Docs | the dialog. The name of the button clicked by the user to close the dialog is passed as argument. This is only available on macOS.
*default*
Gives the :ref:`symbolic name <messagebox-buttons>` of the default button
for this message window (:data:`OK`, :data:`CANCEL`, and so on). If this option is not specified, the f... | the dialog. The name of the button clicked by the user to close the dialog is passed as argument. This is only available on macOS.
*default*
Gives the :ref:`symbolic name <messagebox-buttons>` of the default button
for this message window (:data:`OK`, :data:`CANCEL`, and so on). If this option is not specified, the f... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e79673af-54eb-4b19-a9cf-d4a6f25948cd | CPython Docs | file://datasets/cpython/Doc/library/tkinter.messagebox.rst | unknown | e8be3db7-fa2b-4ff0-b102-73eae98c6437 | 37,652 | supabase-export-v2 | e17e5308d2a10e23 | *message* Specifies the message to display in this message box. The default value is an empty string.
*parent*
Makes the specified window the logical parent of the message box. The message box is displayed on top of its parent window. | trusted_official_docs | CPython Docs | *message* Specifies the message to display in this message box. The default value is an empty string.
*parent*
Makes the specified window the logical parent of the message box. The message box is displayed on top of its parent window. | *message* Specifies the message to display in this message box. The default value is an empty string.
*parent*
Makes the specified window the logical parent of the message box. The message box is displayed on top of its parent window. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f207ec4e-2e18-4f58-8338-1924c649ac1c | CPython Docs | file://datasets/cpython/Doc/library/tkinter.messagebox.rst | unknown | e8be3db7-fa2b-4ff0-b102-73eae98c6437 | 37,651 | supabase-export-v2 | 267dfb517683a97c | *icon* Specifies an :ref:`icon <messagebox-icons>` to display. If this option is not specified, then the :data:`INFO` icon will be displayed.
*message*
Specifies the message to display in this message box. The default value is an empty string. | trusted_official_docs | CPython Docs | *icon* Specifies an :ref:`icon <messagebox-icons>` to display. If this option is not specified, then the :data:`INFO` icon will be displayed.
*message*
Specifies the message to display in this message box. The default value is an empty string. | *icon* Specifies an :ref:`icon <messagebox-icons>` to display. If this option is not specified, then the :data:`INFO` icon will be displayed.
*message*
Specifies the message to display in this message box. The default value is an empty string. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f59aad12-469c-4cb8-a42b-84e9fda5cee0 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.messagebox.rst | unknown | e8be3db7-fa2b-4ff0-b102-73eae98c6437 | 37,656 | supabase-export-v2 | 72cd64de508ebcea | .. method:: show(**options)
Display a message window and wait for the user to select one of the buttons. Then return the symbolic name of the selected button. Keyword arguments can override options specified in the constructor. | trusted_official_docs | CPython Docs | .. method:: show(**options)
Display a message window and wait for the user to select one of the buttons. Then return the symbolic name of the selected button. Keyword arguments can override options specified in the constructor. | .. method:: show(**options)
Display a message window and wait for the user to select one of the buttons. Then return the symbolic name of the selected button. Keyword arguments can override options specified in the constructor. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f6b1b241-84dd-45b3-b3b4-986a7329462b | CPython Docs | file://datasets/cpython/Doc/library/tkinter.messagebox.rst | unknown | e8be3db7-fa2b-4ff0-b102-73eae98c6437 | 37,650 | supabase-export-v2 | 979b3e30e1580908 | The message detail will be presented beneath the main message and, where supported by the OS, in a less emphasized font than the main message.
*icon*
Specifies an :ref:`icon <messagebox-icons>` to display. If this option is not specified, then the :data:`INFO` icon will be
displayed. | trusted_official_docs | CPython Docs | The message detail will be presented beneath the main message and, where supported by the OS, in a less emphasized font than the main message.
*icon*
Specifies an :ref:`icon <messagebox-icons>` to display. If this option is not specified, then the :data:`INFO` icon will be
displayed. | The message detail will be presented beneath the main message and, where supported by the OS, in a less emphasized font than the main message.
*icon*
Specifies an :ref:`icon <messagebox-icons>` to display. If this option is not specified, then the :data:`INFO` icon will be
displayed. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7bb240de-07b6-4832-9353-d5e28438a9e0 | CPython Docs | file://datasets/cpython/Doc/library/urllib.rst | unknown | b66d33c7-9ef0-404d-8292-1fe1e098cc48 | 37,699 | supabase-export-v2 | 2638edf4d55db548 | ``urllib`` is a package that collects several modules for working with URLs:
* :mod:`urllib.request` for opening and reading URLs
* :mod:`urllib.error` containing the exceptions raised by :mod:`urllib.request`
* :mod:`urllib.parse` for parsing URLs
* :mod:`urllib.robotparser` for parsing ``robots.txt`` files | trusted_official_docs | CPython Docs | ``urllib`` is a package that collects several modules for working with URLs:
* :mod:`urllib.request` for opening and reading URLs
* :mod:`urllib.error` containing the exceptions raised by :mod:`urllib.request`
* :mod:`urllib.parse` for parsing URLs
* :mod:`urllib.robotparser` for parsing ``robots.txt`` files | ``urllib`` is a package that collects several modules for working with URLs:
* :mod:`urllib.request` for opening and reading URLs
* :mod:`urllib.error` containing the exceptions raised by :mod:`urllib.request`
* :mod:`urllib.parse` for parsing URLs
* :mod:`urllib.robotparser` for parsing ``robots.txt`` files | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3038ffcd-c437-437d-8671-d8c533a2a9be | CPython Docs | file://datasets/cpython/Doc/library/datatypes.rst | unknown | 6b2a00d8-62db-4410-b2c5-591d17ef3983 | 37,701 | supabase-export-v2 | 4f593de8c16f0a8d | modules described in this chapter provide a variety of specialized data types such as dates and times, fixed-type arrays, heap queues, double-ended queues, and enumerations.
Python also provides some built-in data types, in particular,
:class:`dict`, :class:`list`, :class:`set` and :class:`frozenset`, and
:class:`tuple... | trusted_official_docs | CPython Docs | modules described in this chapter provide a variety of specialized data types such as dates and times, fixed-type arrays, heap queues, double-ended queues, and enumerations.
Python also provides some built-in data types, in particular,
:class:`dict`, :class:`list`, :class:`set` and :class:`frozenset`, and
:class:`tuple... | modules described in this chapter provide a variety of specialized data types such as dates and times, fixed-type arrays, heap queues, double-ended queues, and enumerations.
Python also provides some built-in data types, in particular,
:class:`dict`, :class:`list`, :class:`set` and :class:`frozenset`, and
:class:`tuple... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dd404a0e-4e91-4569-8565-35df592370fe | CPython Docs | file://datasets/cpython/Doc/library/datatypes.rst | unknown | 6b2a00d8-62db-4410-b2c5-591d17ef3983 | 37,702 | supabase-export-v2 | e1c6129f51f6df33 | and :class:`frozenset`, and :class:`tuple`. The :class:`str` class is used to hold Unicode strings, and the :class:`bytes` and :class:`bytearray` classes are used to hold binary data.
The following modules are documented in this chapter: | trusted_official_docs | CPython Docs | and :class:`frozenset`, and :class:`tuple`. The :class:`str` class is used to hold Unicode strings, and the :class:`bytes` and :class:`bytearray` classes are used to hold binary data.
The following modules are documented in this chapter: | and :class:`frozenset`, and :class:`tuple`. The :class:`str` class is used to hold Unicode strings, and the :class:`bytes` and :class:`bytearray` classes are used to hold binary data.
The following modules are documented in this chapter: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e51148f8-bc2f-4fe8-bf4d-008c875b8efe | CPython Docs | file://datasets/cpython/Doc/library/datatypes.rst | unknown | 6b2a00d8-62db-4410-b2c5-591d17ef3983 | 37,700 | supabase-export-v2 | 2e0f6fdfc7228ff9 | ********** Data Types **********
The modules described in this chapter provide a variety of specialized data
types such as dates and times, fixed-type arrays, heap queues, double-ended
queues, and enumerations. | trusted_official_docs | CPython Docs | ********** Data Types **********
The modules described in this chapter provide a variety of specialized data
types such as dates and times, fixed-type arrays, heap queues, double-ended
queues, and enumerations. | ********** Data Types **********
The modules described in this chapter provide a variety of specialized data
types such as dates and times, fixed-type arrays, heap queues, double-ended
queues, and enumerations. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
257993b3-c760-4dff-a020-8fecb996d0d4 | CPython Docs | file://datasets/cpython/Doc/library/email.errors.rst | unknown | 230fa24c-5d6f-4987-846c-895017459553 | 37,750 | supabase-export-v2 | 432438ca009f126f | .. exception:: InvalidBase64CharactersDefect
When decoding a block of base64 encoded bytes, characters outside the base64
alphabet were encountered. The characters are ignored, but the resulting
decoded bytes may be invalid. | trusted_official_docs | CPython Docs | .. exception:: InvalidBase64CharactersDefect
When decoding a block of base64 encoded bytes, characters outside the base64
alphabet were encountered. The characters are ignored, but the resulting
decoded bytes may be invalid. | .. exception:: InvalidBase64CharactersDefect
When decoding a block of base64 encoded bytes, characters outside the base64
alphabet were encountered. The characters are ignored, but the resulting
decoded bytes may be invalid. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
42bad0b8-745c-4c2e-a7b7-48e81fb79c74 | CPython Docs | file://datasets/cpython/Doc/library/email.errors.rst | unknown | 230fa24c-5d6f-4987-846c-895017459553 | 37,726 | supabase-export-v2 | fe1a99b03286aeed | This is the base class for all defects found when parsing email headers. It is derived from :exc:`MessageDefect`.
Here is the list of the defects that the :class:`~email.parser.FeedParser`
can find while parsing messages. Note that the defects are added to the message
where the problem was found, so for example, if a m... | trusted_official_docs | CPython Docs | This is the base class for all defects found when parsing email headers. It is derived from :exc:`MessageDefect`.
Here is the list of the defects that the :class:`~email.parser.FeedParser`
can find while parsing messages. Note that the defects are added to the message
where the problem was found, so for example, if a m... | This is the base class for all defects found when parsing email headers. It is derived from :exc:`MessageDefect`.
Here is the list of the defects that the :class:`~email.parser.FeedParser`
can find while parsing messages. Note that the defects are added to the message
where the problem was found, so for example, if a m... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4be92325-7779-4614-9fb2-ec62a75d0bd4 | CPython Docs | file://datasets/cpython/Doc/library/email.errors.rst | unknown | 230fa24c-5d6f-4987-846c-895017459553 | 37,715 | supabase-export-v2 | e35903b83509e8bc | .. exception:: HeaderParseError()
Raised under some error conditions when parsing the :rfc:`5322` headers of a
message, this class is derived from :exc:`MessageParseError`. The
:meth:`~email.message.EmailMessage.set_boundary` method will raise this
error if the content type is unknown when the method is called. :cla... | trusted_official_docs | CPython Docs | .. exception:: HeaderParseError()
Raised under some error conditions when parsing the :rfc:`5322` headers of a
message, this class is derived from :exc:`MessageParseError`. The
:meth:`~email.message.EmailMessage.set_boundary` method will raise this
error if the content type is unknown when the method is called. :cla... | .. exception:: HeaderParseError()
Raised under some error conditions when parsing the :rfc:`5322` headers of a
message, this class is derived from :exc:`MessageParseError`. The
:meth:`~email.message.EmailMessage.set_boundary` method will raise this
error if the content type is unknown when the method is called. :cla... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
574e2767-3e97-469e-a3e0-081a39453359 | CPython Docs | file://datasets/cpython/Doc/library/email.errors.rst | unknown | 230fa24c-5d6f-4987-846c-895017459553 | 37,740 | supabase-export-v2 | 0380e00af83e547a | .. exception:: MissingHeaderBodySeparatorDefect
A line was found while parsing headers that had no leading white space but
contained no ':'. Parsing continues assuming that the line represents the
first line of the body. | trusted_official_docs | CPython Docs | .. exception:: MissingHeaderBodySeparatorDefect
A line was found while parsing headers that had no leading white space but
contained no ':'. Parsing continues assuming that the line represents the
first line of the body. | .. exception:: MissingHeaderBodySeparatorDefect
A line was found while parsing headers that had no leading white space but
contained no ':'. Parsing continues assuming that the line represents the
first line of the body. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7fc653b5-d99e-41ff-a618-ce068111e83f | CPython Docs | file://datasets/cpython/Doc/library/email.errors.rst | unknown | 230fa24c-5d6f-4987-846c-895017459553 | 37,727 | supabase-export-v2 | 849710780f7a807c | if a message nested inside a :mimetype:`multipart/alternative` had a malformed header, that nested message object would have a defect, but the containing messages would not.
All defect classes are subclassed from :class:`email.errors.MessageDefect`. | trusted_official_docs | CPython Docs | if a message nested inside a :mimetype:`multipart/alternative` had a malformed header, that nested message object would have a defect, but the containing messages would not.
All defect classes are subclassed from :class:`email.errors.MessageDefect`. | if a message nested inside a :mimetype:`multipart/alternative` had a malformed header, that nested message object would have a defect, but the containing messages would not.
All defect classes are subclassed from :class:`email.errors.MessageDefect`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
85491360-960e-40be-a939-ad723501dc62 | CPython Docs | file://datasets/cpython/Doc/library/email.errors.rst | unknown | 230fa24c-5d6f-4987-846c-895017459553 | 37,711 | supabase-export-v2 | a158a112c13169f9 | .. exception:: MessageError()
This is the base class for all exceptions that the :mod:`email` package can
raise. It is derived from the standard :exc:`Exception` class and defines no
additional methods. | trusted_official_docs | CPython Docs | .. exception:: MessageError()
This is the base class for all exceptions that the :mod:`email` package can
raise. It is derived from the standard :exc:`Exception` class and defines no
additional methods. | .. exception:: MessageError()
This is the base class for all exceptions that the :mod:`email` package can
raise. It is derived from the standard :exc:`Exception` class and defines no
additional methods. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9571457e-b93c-47e1-b233-9fcacd8f7477 | CPython Docs | file://datasets/cpython/Doc/library/email.errors.rst | unknown | 230fa24c-5d6f-4987-846c-895017459553 | 37,748 | supabase-export-v2 | 24ef3b5afcf06898 | .. exception:: InvalidBase64PaddingDefect
When decoding a block of base64 encoded bytes, the padding was not correct. Enough padding is added to perform the decode, but the resulting decoded
bytes may be invalid. | trusted_official_docs | CPython Docs | .. exception:: InvalidBase64PaddingDefect
When decoding a block of base64 encoded bytes, the padding was not correct. Enough padding is added to perform the decode, but the resulting decoded
bytes may be invalid. | .. exception:: InvalidBase64PaddingDefect
When decoding a block of base64 encoded bytes, the padding was not correct. Enough padding is added to perform the decode, but the resulting decoded
bytes may be invalid. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9a45039f-251e-4eb4-90d7-6cb952c1118f | CPython Docs | file://datasets/cpython/Doc/library/email.errors.rst | unknown | 230fa24c-5d6f-4987-846c-895017459553 | 37,746 | supabase-export-v2 | bffa1304ef6bcb47 | .. exception:: MultipartInvariantViolationDefect
A message claimed to be a :mimetype:`multipart`, but no subparts were found. Note that when a message has this defect, its
:meth:`~email.message.Message.is_multipart` method may return ``False``
even though its content type claims to be :mimetype:`multipart`. | trusted_official_docs | CPython Docs | .. exception:: MultipartInvariantViolationDefect
A message claimed to be a :mimetype:`multipart`, but no subparts were found. Note that when a message has this defect, its
:meth:`~email.message.Message.is_multipart` method may return ``False``
even though its content type claims to be :mimetype:`multipart`. | .. exception:: MultipartInvariantViolationDefect
A message claimed to be a :mimetype:`multipart`, but no subparts were found. Note that when a message has this defect, its
:meth:`~email.message.Message.is_multipart` method may return ``False``
even though its content type claims to be :mimetype:`multipart`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b18e1f6c-568d-4b94-b073-f18a4d8ec6cd | CPython Docs | file://datasets/cpython/Doc/library/email.errors.rst | unknown | 230fa24c-5d6f-4987-846c-895017459553 | 37,719 | supabase-export-v2 | b5aebafe9d6c8cc4 | .. exception:: MultipartConversionError()
Raised if the :meth:`~email.message.Message.attach` method is called
on an instance of a class derived from
:class:`~email.mime.nonmultipart.MIMENonMultipart` (e.g. :class:`~email.mime.image.MIMEImage`). :exc:`MultipartConversionError` multiply
inherits from :exc:`MessageErr... | trusted_official_docs | CPython Docs | .. exception:: MultipartConversionError()
Raised if the :meth:`~email.message.Message.attach` method is called
on an instance of a class derived from
:class:`~email.mime.nonmultipart.MIMENonMultipart` (e.g. :class:`~email.mime.image.MIMEImage`). :exc:`MultipartConversionError` multiply
inherits from :exc:`MessageErr... | .. exception:: MultipartConversionError()
Raised if the :meth:`~email.message.Message.attach` method is called
on an instance of a class derived from
:class:`~email.mime.nonmultipart.MIMENonMultipart` (e.g. :class:`~email.mime.image.MIMEImage`). :exc:`MultipartConversionError` multiply
inherits from :exc:`MessageErr... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cdb0ad5b-a5c2-4090-9ced-5614f6ce6364 | CPython Docs | file://datasets/cpython/Doc/library/email.errors.rst | unknown | 230fa24c-5d6f-4987-846c-895017459553 | 37,752 | supabase-export-v2 | a87ec9b57af645e7 | .. exception:: InvalidBase64LengthDefect
When decoding a block of base64 encoded bytes, the number of non-padding
base64 characters was invalid (1 more than a multiple of 4). The encoded
block was kept as-is. | trusted_official_docs | CPython Docs | .. exception:: InvalidBase64LengthDefect
When decoding a block of base64 encoded bytes, the number of non-padding
base64 characters was invalid (1 more than a multiple of 4). The encoded
block was kept as-is. | .. exception:: InvalidBase64LengthDefect
When decoding a block of base64 encoded bytes, the number of non-padding
base64 characters was invalid (1 more than a multiple of 4). The encoded
block was kept as-is. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ea8d633e-b2d2-4705-98fc-786145ec7c0b | CPython Docs | file://datasets/cpython/Doc/library/email.errors.rst | unknown | 230fa24c-5d6f-4987-846c-895017459553 | 37,713 | supabase-export-v2 | ab72238e790cf0c5 | .. exception:: MessageParseError()
This is the base class for exceptions raised by the
:class:`~email.parser.Parser` class. It is derived from
:exc:`MessageError`. This class is also used internally by the parser used
by :mod:`~email.headerregistry`. | trusted_official_docs | CPython Docs | .. exception:: MessageParseError()
This is the base class for exceptions raised by the
:class:`~email.parser.Parser` class. It is derived from
:exc:`MessageError`. This class is also used internally by the parser used
by :mod:`~email.headerregistry`. | .. exception:: MessageParseError()
This is the base class for exceptions raised by the
:class:`~email.parser.Parser` class. It is derived from
:exc:`MessageError`. This class is also used internally by the parser used
by :mod:`~email.headerregistry`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1fc58795-f41d-425a-9e2f-c191f578958b | CPython Docs | file://datasets/cpython/Doc/library/netrc.rst | unknown | 8a9f4165-b662-4400-ad53-96a148e41bed | 37,765 | supabase-export-v2 | 29aa4b7217e165d6 | .. versionchanged:: 3.7 :func:`os.path.expanduser` is used to find the location of the :file:`.netrc` file when *file* is not passed as argument.
.. versionchanged:: 3.10
:class:`netrc` try UTF-8 encoding before using locale specific
encoding. The entry in the netrc file no longer needs to contain all tokens. The mis... | trusted_official_docs | CPython Docs | .. versionchanged:: 3.7 :func:`os.path.expanduser` is used to find the location of the :file:`.netrc` file when *file* is not passed as argument.
.. versionchanged:: 3.10
:class:`netrc` try UTF-8 encoding before using locale specific
encoding. The entry in the netrc file no longer needs to contain all tokens. The mis... | .. versionchanged:: 3.7 :func:`os.path.expanduser` is used to find the location of the :file:`.netrc` file when *file* is not passed as argument.
.. versionchanged:: 3.10
:class:`netrc` try UTF-8 encoding before using locale specific
encoding. The entry in the netrc file no longer needs to contain all tokens. The mis... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
36bb2eaa-0423-42c9-82ac-9da05cad666c | CPython Docs | file://datasets/cpython/Doc/library/netrc.rst | unknown | 8a9f4165-b662-4400-ad53-96a148e41bed | 37,777 | supabase-export-v2 | 04cac4a0d860738c | .. method:: netrc.authenticators(host)
Return a 3-tuple ``(login, account, password)`` of authenticators for *host*. If the netrc file did not contain an entry for the given host, return the tuple
associated with the 'default' entry. If neither matching host nor default entry
is available, return ``None``. | trusted_official_docs | CPython Docs | .. method:: netrc.authenticators(host)
Return a 3-tuple ``(login, account, password)`` of authenticators for *host*. If the netrc file did not contain an entry for the given host, return the tuple
associated with the 'default' entry. If neither matching host nor default entry
is available, return ``None``. | .. method:: netrc.authenticators(host)
Return a 3-tuple ``(login, account, password)`` of authenticators for *host*. If the netrc file did not contain an entry for the given host, return the tuple
associated with the 'default' entry. If neither matching host nor default entry
is available, return ``None``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
aaa0ccf4-05be-465e-949d-ec5ed8dc16c5 | CPython Docs | file://datasets/cpython/Doc/library/netrc.rst | unknown | 8a9f4165-b662-4400-ad53-96a148e41bed | 37,763 | supabase-export-v2 | b26b148cf9b2bcd4 | behavior equivalent to that of ftp and other programs that use :file:`.netrc`. Such security checks are not available on platforms that do not support :func:`os.getuid`.
.. versionchanged:: 3.4 Added the POSIX permission check. | trusted_official_docs | CPython Docs | behavior equivalent to that of ftp and other programs that use :file:`.netrc`. Such security checks are not available on platforms that do not support :func:`os.getuid`.
.. versionchanged:: 3.4 Added the POSIX permission check. | behavior equivalent to that of ftp and other programs that use :file:`.netrc`. Such security checks are not available on platforms that do not support :func:`os.getuid`.
.. versionchanged:: 3.4 Added the POSIX permission check. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e3ea42ae-a43e-4001-aace-bfddb8e21e16 | CPython Docs | file://datasets/cpython/Doc/library/netrc.rst | unknown | 8a9f4165-b662-4400-ad53-96a148e41bed | 37,762 | supabase-export-v2 | 13766ad178bb5c54 | read. Otherwise, a :exc:`FileNotFoundError` exception will be raised. Parse errors will raise :exc:`NetrcParseError` with diagnostic information including the file name, line number, and terminating token.
If no argument is specified on a POSIX system, the presence of passwords in
the :file:`.netrc` file will raise a ... | trusted_official_docs | CPython Docs | read. Otherwise, a :exc:`FileNotFoundError` exception will be raised. Parse errors will raise :exc:`NetrcParseError` with diagnostic information including the file name, line number, and terminating token.
If no argument is specified on a POSIX system, the presence of passwords in
the :file:`.netrc` file will raise a ... | read. Otherwise, a :exc:`FileNotFoundError` exception will be raised. Parse errors will raise :exc:`NetrcParseError` with diagnostic information including the file name, line number, and terminating token.
If no argument is specified on a POSIX system, the presence of passwords in
the :file:`.netrc` file will raise a ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e840df9d-7710-4ef2-82fd-b275dc190e6d | CPython Docs | file://datasets/cpython/Doc/library/netrc.rst | unknown | 8a9f4165-b662-4400-ad53-96a148e41bed | 37,761 | supabase-export-v2 | f69eb4fd745e4897 | .. class:: netrc([file])
A :class:`~netrc.netrc` instance or subclass instance encapsulates data from a netrc
file. The initialization argument, if present, specifies the file to parse. If
no argument is given, the file :file:`.netrc` in the user's home directory --
as determined by :func:`os.path.expanduser` -- wil... | trusted_official_docs | CPython Docs | .. class:: netrc([file])
A :class:`~netrc.netrc` instance or subclass instance encapsulates data from a netrc
file. The initialization argument, if present, specifies the file to parse. If
no argument is given, the file :file:`.netrc` in the user's home directory --
as determined by :func:`os.path.expanduser` -- wil... | .. class:: netrc([file])
A :class:`~netrc.netrc` instance or subclass instance encapsulates data from a netrc
file. The initialization argument, if present, specifies the file to parse. If
no argument is given, the file :file:`.netrc` in the user's home directory --
as determined by :func:`os.path.expanduser` -- wil... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
027860b7-5ed4-4c10-8648-194c3cd75f55 | CPython Docs | file://datasets/cpython/Doc/library/bz2.rst | unknown | ba6e9295-4bc5-4978-902f-011bf6f11be5 | 37,884 | supabase-export-v2 | d5de160ef5cdd17c | Using :func:`compress` and :func:`decompress` to demonstrate round-trip compression:
>>> import bz2
>>> data = b"""\
... Donec rhoncus quis sapien sit amet molestie. Fusce scelerisque vel augue
... nec ullamcorper. Nam rutrum pretium placerat. Aliquam vel tristique lorem,
... sit amet cursus ante. In interdum laore... | trusted_official_docs | CPython Docs | Using :func:`compress` and :func:`decompress` to demonstrate round-trip compression:
>>> import bz2
>>> data = b"""\
... Donec rhoncus quis sapien sit amet molestie. Fusce scelerisque vel augue
... nec ullamcorper. Nam rutrum pretium placerat. Aliquam vel tristique lorem,
... sit amet cursus ante. In interdum laore... | Using :func:`compress` and :func:`decompress` to demonstrate round-trip compression:
>>> import bz2
>>> data = b"""\
... Donec rhoncus quis sapien sit amet molestie. Fusce scelerisque vel augue
... nec ullamcorper. Nam rutrum pretium placerat. Aliquam vel tristique lorem,
... sit amet cursus ante. In interdum laore... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
06150ac2-b1cd-4e21-955a-ee063b1e1be7 | CPython Docs | file://datasets/cpython/Doc/library/bz2.rst | unknown | ba6e9295-4bc5-4978-902f-011bf6f11be5 | 37,849 | supabase-export-v2 | 47d3342a83d4ad6a | Provide data to the compressor object. Returns a chunk of compressed data if possible, or an empty byte string otherwise.
When you have finished providing data to the compressor, call the
:meth:`flush` method to finish the compression process. | trusted_official_docs | CPython Docs | Provide data to the compressor object. Returns a chunk of compressed data if possible, or an empty byte string otherwise.
When you have finished providing data to the compressor, call the
:meth:`flush` method to finish the compression process. | Provide data to the compressor object. Returns a chunk of compressed data if possible, or an empty byte string otherwise.
When you have finished providing data to the compressor, call the
:meth:`flush` method to finish the compression process. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
13c69157-932b-4e77-852d-689bc34a344c | CPython Docs | file://datasets/cpython/Doc/library/bz2.rst | unknown | ba6e9295-4bc5-4978-902f-011bf6f11be5 | 37,825 | supabase-export-v2 | 340556ac66075673 | .. method:: read1(size=-1)
Read up to *size* uncompressed bytes, while trying to avoid
making multiple reads from the underlying stream. Reads up to a
buffer's worth of data if size is negative. | trusted_official_docs | CPython Docs | .. method:: read1(size=-1)
Read up to *size* uncompressed bytes, while trying to avoid
making multiple reads from the underlying stream. Reads up to a
buffer's worth of data if size is negative. | .. method:: read1(size=-1)
Read up to *size* uncompressed bytes, while trying to avoid
making multiple reads from the underlying stream. Reads up to a
buffer's worth of data if size is negative. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
158d3077-1650-4c7a-9b04-ebd1e1a785e1 | CPython Docs | file://datasets/cpython/Doc/library/bz2.rst | unknown | ba6e9295-4bc5-4978-902f-011bf6f11be5 | 37,846 | supabase-export-v2 | 500eec6f05b68c70 | Create a new compressor object. This object may be used to compress data incrementally. For one-shot compression, use the :func:`compress` function instead.
*compresslevel*, if given, must be an integer between ``1`` and ``9``. The
default is ``9``. | trusted_official_docs | CPython Docs | Create a new compressor object. This object may be used to compress data incrementally. For one-shot compression, use the :func:`compress` function instead.
*compresslevel*, if given, must be an integer between ``1`` and ``9``. The
default is ``9``. | Create a new compressor object. This object may be used to compress data incrementally. For one-shot compression, use the :func:`compress` function instead.
*compresslevel*, if given, must be an integer between ``1`` and ``9``. The
default is ``9``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
15adff37-03b7-47c9-9e9e-db8c050dd61a | CPython Docs | file://datasets/cpython/Doc/library/bz2.rst | unknown | ba6e9295-4bc5-4978-902f-011bf6f11be5 | 37,840 | supabase-export-v2 | a619ce309c085a2f | .. versionchanged:: 3.6 Accepts a :term:`path-like object`.
.. versionchanged:: 3.9
The *buffering* parameter has been removed. It was ignored and deprecated
since Python 3.0. Pass an open file object to control how the file is
opened. | trusted_official_docs | CPython Docs | .. versionchanged:: 3.6 Accepts a :term:`path-like object`.
.. versionchanged:: 3.9
The *buffering* parameter has been removed. It was ignored and deprecated
since Python 3.0. Pass an open file object to control how the file is
opened. | .. versionchanged:: 3.6 Accepts a :term:`path-like object`.
.. versionchanged:: 3.9
The *buffering* parameter has been removed. It was ignored and deprecated
since Python 3.0. Pass an open file object to control how the file is
opened. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
16b8ac80-8446-4863-b303-c3f8fa100705 | CPython Docs | file://datasets/cpython/Doc/library/bz2.rst | unknown | ba6e9295-4bc5-4978-902f-011bf6f11be5 | 37,796 | supabase-export-v2 | 98bc295a4d80c953 | Open a bzip2-compressed file in binary or text mode, returning a :term:`file object`.
As with the constructor for :class:`BZ2File`, the *filename* argument can be
an actual filename (a :class:`str` or :class:`bytes` object), or an existing
file object to read from or write to. | trusted_official_docs | CPython Docs | Open a bzip2-compressed file in binary or text mode, returning a :term:`file object`.
As with the constructor for :class:`BZ2File`, the *filename* argument can be
an actual filename (a :class:`str` or :class:`bytes` object), or an existing
file object to read from or write to. | Open a bzip2-compressed file in binary or text mode, returning a :term:`file object`.
As with the constructor for :class:`BZ2File`, the *filename* argument can be
an actual filename (a :class:`str` or :class:`bytes` object), or an existing
file object to read from or write to. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1aa890cb-5522-4976-8af9-aa7504e6e97f | CPython Docs | file://datasets/cpython/Doc/library/bz2.rst | unknown | ba6e9295-4bc5-4978-902f-011bf6f11be5 | 37,858 | supabase-export-v2 | 49111ab337046b62 | be buffered internally, for use in later calls to :meth:`decompress`. The returned data should be concatenated with the output of any previous calls to :meth:`decompress`.
If *max_length* is nonnegative, returns at most *max_length*
bytes of decompressed data. If this limit is reached and further
output can be produc... | trusted_official_docs | CPython Docs | be buffered internally, for use in later calls to :meth:`decompress`. The returned data should be concatenated with the output of any previous calls to :meth:`decompress`.
If *max_length* is nonnegative, returns at most *max_length*
bytes of decompressed data. If this limit is reached and further
output can be produc... | be buffered internally, for use in later calls to :meth:`decompress`. The returned data should be concatenated with the output of any previous calls to :meth:`decompress`.
If *max_length* is nonnegative, returns at most *max_length*
bytes of decompressed data. If this limit is reached and further
output can be produc... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
24ca54db-7942-4894-9af8-a9a56627ae82 | CPython Docs | file://datasets/cpython/Doc/library/bz2.rst | unknown | ba6e9295-4bc5-4978-902f-011bf6f11be5 | 37,861 | supabase-export-v2 | c56eb01f890b2c59 | end of stream is reached raises an :exc:`EOFError`. Any data found after the end of the stream is ignored and saved in the :attr:`~.unused_data` attribute.
.. versionchanged:: 3.5
Added the *max_length* parameter. | trusted_official_docs | CPython Docs | end of stream is reached raises an :exc:`EOFError`. Any data found after the end of the stream is ignored and saved in the :attr:`~.unused_data` attribute.
.. versionchanged:: 3.5
Added the *max_length* parameter. | end of stream is reached raises an :exc:`EOFError`. Any data found after the end of the stream is ignored and saved in the :attr:`~.unused_data` attribute.
.. versionchanged:: 3.5
Added the *max_length* parameter. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2636f8cb-c43b-4963-a844-16663ab048cc | CPython Docs | file://datasets/cpython/Doc/library/bz2.rst | unknown | ba6e9295-4bc5-4978-902f-011bf6f11be5 | 37,855 | supabase-export-v2 | 5e1186e41359dc40 | Create a new decompressor object. This object may be used to decompress data incrementally. For one-shot compression, use the :func:`decompress` function instead.
.. note::
This class does not transparently handle inputs containing multiple
compressed streams, unlike :func:`decompress` and :class:`BZ2File`. If
you n... | trusted_official_docs | CPython Docs | Create a new decompressor object. This object may be used to decompress data incrementally. For one-shot compression, use the :func:`decompress` function instead.
.. note::
This class does not transparently handle inputs containing multiple
compressed streams, unlike :func:`decompress` and :class:`BZ2File`. If
you n... | Create a new decompressor object. This object may be used to decompress data incrementally. For one-shot compression, use the :func:`decompress` function instead.
.. note::
This class does not transparently handle inputs containing multiple
compressed streams, unlike :func:`decompress` and :class:`BZ2File`. If
you n... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
30c5ed7a-d234-49fb-9275-95452e81b853 | CPython Docs | file://datasets/cpython/Doc/library/bz2.rst | unknown | ba6e9295-4bc5-4978-902f-011bf6f11be5 | 37,859 | supabase-export-v2 | d1c71f8b28b21659 | attribute will be set to ``False``. In this case, the next call to :meth:`~.decompress` may provide *data* as ``b''`` to obtain more of the output.
If all of the input data was decompressed and returned (either
because this was less than *max_length* bytes, or because
*max_length* was negative), the :attr:`~.needs_in... | trusted_official_docs | CPython Docs | attribute will be set to ``False``. In this case, the next call to :meth:`~.decompress` may provide *data* as ``b''`` to obtain more of the output.
If all of the input data was decompressed and returned (either
because this was less than *max_length* bytes, or because
*max_length* was negative), the :attr:`~.needs_in... | attribute will be set to ``False``. In this case, the next call to :meth:`~.decompress` may provide *data* as ``b''`` to obtain more of the output.
If all of the input data was decompressed and returned (either
because this was less than *max_length* bytes, or because
*max_length* was negative), the :attr:`~.needs_in... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
38727409-10c1-4903-8465-129e950b1ce3 | CPython Docs | file://datasets/cpython/Doc/library/bz2.rst | unknown | ba6e9295-4bc5-4978-902f-011bf6f11be5 | 37,815 | supabase-export-v2 | 7a1126726289b81b | without advancing the file position. At least one byte of data will be returned (unless at EOF). The exact number of bytes returned is unspecified.
.. note:: While calling :meth:`peek` does not change the file position of
the :class:`BZ2File`, it may change the position of the underlying file
object (e.g. if the :cla... | trusted_official_docs | CPython Docs | without advancing the file position. At least one byte of data will be returned (unless at EOF). The exact number of bytes returned is unspecified.
.. note:: While calling :meth:`peek` does not change the file position of
the :class:`BZ2File`, it may change the position of the underlying file
object (e.g. if the :cla... | without advancing the file position. At least one byte of data will be returned (unless at EOF). The exact number of bytes returned is unspecified.
.. note:: While calling :meth:`peek` does not change the file position of
the :class:`BZ2File`, it may change the position of the underlying file
object (e.g. if the :cla... | 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.