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
21b5ad2b-7ac2-469d-88d4-578528af7f0e
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,866
supabase-export-v2
887e3f83a7cc7cab
.. function:: open(filename, flag='c', protocol=None, writeback=False, *, \ serializer=None, deserializer=None) Open a persistent dictionary. The filename specified is the base filename for the underlying database. As a side-effect, an extension may be added to the filename and more than one file may be created. By d...
trusted_official_docs
CPython Docs
.. function:: open(filename, flag='c', protocol=None, writeback=False, *, \ serializer=None, deserializer=None) Open a persistent dictionary. The filename specified is the base filename for the underlying database. As a side-effect, an extension may be added to the filename and more than one file may be created. By d...
.. function:: open(filename, flag='c', protocol=None, writeback=False, *, \ serializer=None, deserializer=None) Open a persistent dictionary. The filename specified is the base filename for the underlying database. As a side-effect, an extension may be added to the filename and more than one file may be created. By d...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2ecbae45-0530-45cb-a192-fb5ac0a810f2
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,900
supabase-export-v2
08f691e19fe413a4
values. The version of the pickle protocol can be specified with the *protocol* parameter. See the :mod:`pickle` documentation for a discussion of the pickle protocols. If the *writeback* parameter is ``True``, the object will hold a cache of all entries accessed and write them back to the *dict* at sync and close tim...
trusted_official_docs
CPython Docs
values. The version of the pickle protocol can be specified with the *protocol* parameter. See the :mod:`pickle` documentation for a discussion of the pickle protocols. If the *writeback* parameter is ``True``, the object will hold a cache of all entries accessed and write them back to the *dict* at sync and close tim...
values. The version of the pickle protocol can be specified with the *protocol* parameter. See the :mod:`pickle` documentation for a discussion of the pickle protocols. If the *writeback* parameter is ``True``, the object will hold a cache of all entries accessed and write them back to the *dict* at sync and close tim...
python, official-docs, cpython, P0
Local_Trusted_Corpus
30633eb6-2b41-4dbe-a2d6-16300454ec66
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,870
supabase-export-v2
882120f09be029c1
By default, :mod:`!shelve` uses :func:`pickle.dumps` and :func:`pickle.loads` for serializing and deserializing. This can be changed by supplying *serializer* and *deserializer*, respectively. The *serializer* argument must be a callable which takes an object ``obj`` and the *protocol* as inputs and returns the repres...
trusted_official_docs
CPython Docs
By default, :mod:`!shelve` uses :func:`pickle.dumps` and :func:`pickle.loads` for serializing and deserializing. This can be changed by supplying *serializer* and *deserializer*, respectively. The *serializer* argument must be a callable which takes an object ``obj`` and the *protocol* as inputs and returns the repres...
By default, :mod:`!shelve` uses :func:`pickle.dumps` and :func:`pickle.loads` for serializing and deserializing. This can be changed by supplying *serializer* and *deserializer*, respectively. The *serializer* argument must be a callable which takes an object ``obj`` and the *protocol* as inputs and returns the repres...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4112bfd9-f896-43f8-97d6-33693ecaff81
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,897
supabase-export-v2
ecd00a873a1efa65
packages and may temporarily increase resource usage (especially disk space) when called. Additionally, it will never run automatically and instead needs to be called explicitly. .. class:: Shelf(dict, protocol=None, writeback=False, \ keyencoding='utf-8', *, serializer=None, deserializer=None)
trusted_official_docs
CPython Docs
packages and may temporarily increase resource usage (especially disk space) when called. Additionally, it will never run automatically and instead needs to be called explicitly. .. class:: Shelf(dict, protocol=None, writeback=False, \ keyencoding='utf-8', *, serializer=None, deserializer=None)
packages and may temporarily increase resource usage (especially disk space) when called. Additionally, it will never run automatically and instead needs to be called explicitly. .. class:: Shelf(dict, protocol=None, writeback=False, \ keyencoding='utf-8', *, serializer=None, deserializer=None)
python, official-docs, cpython, P0
Local_Trusted_Corpus
4a299bcb-781f-45c7-a9ba-fb4e5eae9cff
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,878
supabase-export-v2
cb1a76be603458eb
rely on the shelf being closed automatically; always call :meth:`~Shelf.close` explicitly when you don't need it any more, or use :func:`shelve.open` as a context manager:: with shelve.open('spam') as db: db['eggs'] = 'eggs'
trusted_official_docs
CPython Docs
rely on the shelf being closed automatically; always call :meth:`~Shelf.close` explicitly when you don't need it any more, or use :func:`shelve.open` as a context manager:: with shelve.open('spam') as db: db['eggs'] = 'eggs'
rely on the shelf being closed automatically; always call :meth:`~Shelf.close` explicitly when you don't need it any more, or use :func:`shelve.open` as a context manager:: with shelve.open('spam') as db: db['eggs'] = 'eggs'
python, official-docs, cpython, P0
Local_Trusted_Corpus
55c7f317-8ddb-4179-86b8-826eeafe8ba2
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,895
supabase-export-v2
7ea804927c8e996d
or writing. Unix file locking can be used to solve this, but this differs across Unix versions and requires knowledge about the database implementation used. * On macOS :mod:`dbm.ndbm` can silently corrupt the database file on updates, which can cause hard crashes when trying to read from the database.
trusted_official_docs
CPython Docs
or writing. Unix file locking can be used to solve this, but this differs across Unix versions and requires knowledge about the database implementation used. * On macOS :mod:`dbm.ndbm` can silently corrupt the database file on updates, which can cause hard crashes when trying to read from the database.
or writing. Unix file locking can be used to solve this, but this differs across Unix versions and requires knowledge about the database implementation used. * On macOS :mod:`dbm.ndbm` can silently corrupt the database file on updates, which can cause hard crashes when trying to read from the database.
python, official-docs, cpython, P0
Local_Trusted_Corpus
66fc14d0-bf1d-43f9-9890-9169f6e84eb9
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,884
supabase-export-v2
3b7b365d5373fcec
.. method:: Shelf.sync() Write back all entries in the cache if the shelf was opened with *writeback* set to :const:`True`. Also empty the cache and synchronize the persistent dictionary on disk, if feasible. This is called automatically when :meth:`reorganize` is called or the shelf is closed with :meth:`close`.
trusted_official_docs
CPython Docs
.. method:: Shelf.sync() Write back all entries in the cache if the shelf was opened with *writeback* set to :const:`True`. Also empty the cache and synchronize the persistent dictionary on disk, if feasible. This is called automatically when :meth:`reorganize` is called or the shelf is closed with :meth:`close`.
.. method:: Shelf.sync() Write back all entries in the cache if the shelf was opened with *writeback* set to :const:`True`. Also empty the cache and synchronize the persistent dictionary on disk, if feasible. This is called automatically when :meth:`reorganize` is called or the shelf is closed with :meth:`close`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
6a94f265-d4aa-4189-8b91-bbcd8a683579
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,896
supabase-export-v2
7be57e00d7bbe972
* On macOS :mod:`dbm.ndbm` can silently corrupt the database file on updates, which can cause hard crashes when trying to read from the database. * :meth:`Shelf.reorganize` may not be available for all database packages and may temporarily increase resource usage (especially disk space) when called. Additionally, it w...
trusted_official_docs
CPython Docs
* On macOS :mod:`dbm.ndbm` can silently corrupt the database file on updates, which can cause hard crashes when trying to read from the database. * :meth:`Shelf.reorganize` may not be available for all database packages and may temporarily increase resource usage (especially disk space) when called. Additionally, it w...
* On macOS :mod:`dbm.ndbm` can silently corrupt the database file on updates, which can cause hard crashes when trying to read from the database. * :meth:`Shelf.reorganize` may not be available for all database packages and may temporarily increase resource usage (especially disk space) when called. Additionally, it w...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6cc8337c-f201-4187-a0fc-f4321c939d98
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,922
supabase-export-v2
9e9c19d6f5efefd3
carefully: temp = d['xx'] # extracts the copy temp.append(5) # mutates the copy d['xx'] = temp # stores the copy right back, to persist it # or, d=shelve.open(filename,writeback=True) would let you just code # d['xx'].append(5) and have it work as expected, BUT it would also # consume more memory and make the d.close...
trusted_official_docs
CPython Docs
carefully: temp = d['xx'] # extracts the copy temp.append(5) # mutates the copy d['xx'] = temp # stores the copy right back, to persist it # or, d=shelve.open(filename,writeback=True) would let you just code # d['xx'].append(5) and have it work as expected, BUT it would also # consume more memory and make the d.close...
carefully: temp = d['xx'] # extracts the copy temp.append(5) # mutates the copy d['xx'] = temp # stores the copy right back, to persist it # or, d=shelve.open(filename,writeback=True) would let you just code # d['xx'].append(5) and have it work as expected, BUT it would also # consume more memory and make the d.close...
python, official-docs, cpython, P0
Local_Trusted_Corpus
705f2b40-55b0-4967-865f-0668a5340c44
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,902
supabase-export-v2
2bd7263541efca6b
The *keyencoding* parameter is the encoding used to encode keys before they are used with the underlying dict. The *serializer* and *deserializer* parameters have the same interpretation as in :func:`~shelve.open`.
trusted_official_docs
CPython Docs
The *keyencoding* parameter is the encoding used to encode keys before they are used with the underlying dict. The *serializer* and *deserializer* parameters have the same interpretation as in :func:`~shelve.open`.
The *keyencoding* parameter is the encoding used to encode keys before they are used with the underlying dict. The *serializer* and *deserializer* parameters have the same interpretation as in :func:`~shelve.open`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
709a44fd-e4ec-4d7e-8323-eada08db47db
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,899
supabase-export-v2
8d68092de1553875
A subclass of :class:`collections.abc.MutableMapping` which stores pickled values in the *dict* object. By default, pickles created with :const:`pickle.DEFAULT_PROTOCOL` are used to serialize values. The version of the pickle protocol can be specified with the *protocol* parameter. See the :mod:`pickle` documentation...
trusted_official_docs
CPython Docs
A subclass of :class:`collections.abc.MutableMapping` which stores pickled values in the *dict* object. By default, pickles created with :const:`pickle.DEFAULT_PROTOCOL` are used to serialize values. The version of the pickle protocol can be specified with the *protocol* parameter. See the :mod:`pickle` documentation...
A subclass of :class:`collections.abc.MutableMapping` which stores pickled values in the *dict* object. By default, pickles created with :const:`pickle.DEFAULT_PROTOCOL` are used to serialize values. The version of the pickle protocol can be specified with the *protocol* parameter. See the :mod:`pickle` documentation...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7f6987ae-c935-4656-9629-7459e07c7bc7
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,913
supabase-export-v2
a6e0e943a912d5a5
parameter has the same interpretation as for the :func:`.open` function. The optional *protocol*, *writeback*, *serializer* and *deserializer* parameters have the same interpretation as in :func:`~shelve.open`. .. versionchanged:: 3.15 Added the *serializer* and *deserializer* parameters.
trusted_official_docs
CPython Docs
parameter has the same interpretation as for the :func:`.open` function. The optional *protocol*, *writeback*, *serializer* and *deserializer* parameters have the same interpretation as in :func:`~shelve.open`. .. versionchanged:: 3.15 Added the *serializer* and *deserializer* parameters.
parameter has the same interpretation as for the :func:`.open` function. The optional *protocol*, *writeback*, *serializer* and *deserializer* parameters have the same interpretation as in :func:`~shelve.open`. .. versionchanged:: 3.15 Added the *serializer* and *deserializer* parameters.
python, official-docs, cpython, P0
Local_Trusted_Corpus
812d0c90-53d4-4809-bc2d-5b98abee4fbf
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,867
supabase-export-v2
ae4d3f30a2b9f194
default, the underlying database file is opened for reading and writing. The optional *flag* parameter has the same interpretation as the *flag* parameter of :func:`dbm.open`. By default, pickles created with :const:`pickle.DEFAULT_PROTOCOL` are used to serialize values. The version of the pickle protocol can be speci...
trusted_official_docs
CPython Docs
default, the underlying database file is opened for reading and writing. The optional *flag* parameter has the same interpretation as the *flag* parameter of :func:`dbm.open`. By default, pickles created with :const:`pickle.DEFAULT_PROTOCOL` are used to serialize values. The version of the pickle protocol can be speci...
default, the underlying database file is opened for reading and writing. The optional *flag* parameter has the same interpretation as the *flag* parameter of :func:`dbm.open`. By default, pickles created with :const:`pickle.DEFAULT_PROTOCOL` are used to serialize values. The version of the pickle protocol can be speci...
python, official-docs, cpython, P0
Local_Trusted_Corpus
85a333a3-71bc-4d67-b0f1-dd4d2a0e98d9
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,880
supabase-export-v2
85333a0220bbd7ed
.. warning:: Because the :mod:`!shelve` module is backed by :mod:`pickle`, it is insecure to load a shelf from an untrusted source. Like with pickle, loading a shelf can execute arbitrary code.
trusted_official_docs
CPython Docs
.. warning:: Because the :mod:`!shelve` module is backed by :mod:`pickle`, it is insecure to load a shelf from an untrusted source. Like with pickle, loading a shelf can execute arbitrary code.
.. warning:: Because the :mod:`!shelve` module is backed by :mod:`pickle`, it is insecure to load a shelf from an untrusted source. Like with pickle, loading a shelf can execute arbitrary code.
python, official-docs, cpython, P0
Local_Trusted_Corpus
8f6cd9b9-7048-42b9-9a08-875e1cacff51
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,894
supabase-export-v2
7a2452528c561217
representation of) the objects stored in the database should be fairly small, and in rare cases key collisions may cause the database to refuse updates. * The :mod:`!shelve` module does not support *concurrent* read/write access to shelved objects. (Multiple simultaneous read accesses are safe.) When a program has a ...
trusted_official_docs
CPython Docs
representation of) the objects stored in the database should be fairly small, and in rare cases key collisions may cause the database to refuse updates. * The :mod:`!shelve` module does not support *concurrent* read/write access to shelved objects. (Multiple simultaneous read accesses are safe.) When a program has a ...
representation of) the objects stored in the database should be fairly small, and in rare cases key collisions may cause the database to refuse updates. * The :mod:`!shelve` module does not support *concurrent* read/write access to shelved objects. (Multiple simultaneous read accesses are safe.) When a program has a ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
980bf734-2b4c-42fd-b041-01166b6cbd40
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,893
supabase-export-v2
37ef1ef2385250d5
.. index:: pair: module; dbm.ndbm pair: module; dbm.gnu * The choice of which database package will be used (such as :mod:`dbm.ndbm` or :mod:`dbm.gnu`) depends on which interface is available. Therefore it is not safe to open the database directly using :mod:`dbm`. The database is also (unfortunately) subject to the...
trusted_official_docs
CPython Docs
.. index:: pair: module; dbm.ndbm pair: module; dbm.gnu * The choice of which database package will be used (such as :mod:`dbm.ndbm` or :mod:`dbm.gnu`) depends on which interface is available. Therefore it is not safe to open the database directly using :mod:`dbm`. The database is also (unfortunately) subject to the...
.. index:: pair: module; dbm.ndbm pair: module; dbm.gnu * The choice of which database package will be used (such as :mod:`dbm.ndbm` or :mod:`dbm.gnu`) depends on which interface is available. Therefore it is not safe to open the database directly using :mod:`dbm`. The database is also (unfortunately) subject to the...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9e0a87de-a75a-4e29-a270-9634a91a5ba3
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,869
supabase-export-v2
0d36b42fcc99ff0f
slow since all accessed entries are written back (there is no way to determine which accessed entries are mutable, nor which ones were actually mutated). By default, :mod:`!shelve` uses :func:`pickle.dumps` and :func:`pickle.loads` for serializing and deserializing. This can be changed by supplying *serializer* and *...
trusted_official_docs
CPython Docs
slow since all accessed entries are written back (there is no way to determine which accessed entries are mutable, nor which ones were actually mutated). By default, :mod:`!shelve` uses :func:`pickle.dumps` and :func:`pickle.loads` for serializing and deserializing. This can be changed by supplying *serializer* and *...
slow since all accessed entries are written back (there is no way to determine which accessed entries are mutable, nor which ones were actually mutated). By default, :mod:`!shelve` uses :func:`pickle.dumps` and :func:`pickle.loads` for serializing and deserializing. This can be changed by supplying *serializer* and *...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a30f544b-87ac-4479-9418-b576be1f5c28
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,921
supabase-export-v2
e9ad6baf1ae86914
WITHOUT writeback=True, beware: d['xx'] = [0, 1, 2] # this works as expected, but... d['xx'].append(3) # *this doesn't!* -- d['xx'] is STILL [0, 1, 2]! # having opened d without writeback=True, you need to code carefully: temp = d['xx'] # extracts the copy temp.append(5) # mutates the copy d['xx'] = temp # stores th...
trusted_official_docs
CPython Docs
WITHOUT writeback=True, beware: d['xx'] = [0, 1, 2] # this works as expected, but... d['xx'].append(3) # *this doesn't!* -- d['xx'] is STILL [0, 1, 2]! # having opened d without writeback=True, you need to code carefully: temp = d['xx'] # extracts the copy temp.append(5) # mutates the copy d['xx'] = temp # stores th...
WITHOUT writeback=True, beware: d['xx'] = [0, 1, 2] # this works as expected, but... d['xx'].append(3) # *this doesn't!* -- d['xx'] is STILL [0, 1, 2]! # having opened d without writeback=True, you need to code carefully: temp = d['xx'] # extracts the copy temp.append(5) # mutates the copy d['xx'] = temp # stores th...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b40d1e8b-8932-4172-9c05-4e2b0ab0b9d9
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,901
supabase-export-v2
74df195dbba9693a
and close times. This allows natural operations on mutable entries, but can consume much more memory and make sync and close take a long time. The *keyencoding* parameter is the encoding used to encode keys before they are used with the underlying dict.
trusted_official_docs
CPython Docs
and close times. This allows natural operations on mutable entries, but can consume much more memory and make sync and close take a long time. The *keyencoding* parameter is the encoding used to encode keys before they are used with the underlying dict.
and close times. This allows natural operations on mutable entries, but can consume much more memory and make sync and close take a long time. The *keyencoding* parameter is the encoding used to encode keys before they are used with the underlying dict.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b63438c0-3c78-4f2a-876d-b1ad38e25300
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,871
supabase-export-v2
a21759eb04159aa7
object ``obj`` and the *protocol* as inputs and returns the representation ``obj`` as a :term:`bytes-like object`; the *protocol* value may be ignored by the serializer. The *deserializer* argument must be a callable which takes a serialized object given as a :class:`bytes` object and returns the corresponding object.
trusted_official_docs
CPython Docs
object ``obj`` and the *protocol* as inputs and returns the representation ``obj`` as a :term:`bytes-like object`; the *protocol* value may be ignored by the serializer. The *deserializer* argument must be a callable which takes a serialized object given as a :class:`bytes` object and returns the corresponding object.
object ``obj`` and the *protocol* as inputs and returns the representation ``obj`` as a :term:`bytes-like object`; the *protocol* value may be ignored by the serializer. The *deserializer* argument must be a callable which takes a serialized object given as a :class:`bytes` object and returns the corresponding object.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c3611a8f-9d24-45b0-94ce-84d2f365d9d4
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,909
supabase-export-v2
3a6e7a50ab1a69b3
.. class:: BsdDbShelf(dict, protocol=None, writeback=False, \ keyencoding='utf-8', *, \ serializer=None, deserializer=None) A subclass of :class:`Shelf` which exposes :meth:`!first`, :meth:`!next`, :meth:`!previous`, :meth:`!last` and :meth:`!set_location` methods. These are available in the third-party :mod:`!bsddb`...
trusted_official_docs
CPython Docs
.. class:: BsdDbShelf(dict, protocol=None, writeback=False, \ keyencoding='utf-8', *, \ serializer=None, deserializer=None) A subclass of :class:`Shelf` which exposes :meth:`!first`, :meth:`!next`, :meth:`!previous`, :meth:`!last` and :meth:`!set_location` methods. These are available in the third-party :mod:`!bsddb`...
.. class:: BsdDbShelf(dict, protocol=None, writeback=False, \ keyencoding='utf-8', *, \ serializer=None, deserializer=None) A subclass of :class:`Shelf` which exposes :meth:`!first`, :meth:`!next`, :meth:`!previous`, :meth:`!last` and :meth:`!set_location` methods. These are available in the third-party :mod:`!bsddb`...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c7a4254d-045b-4be5-9e60-89bfccc62dd6
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,868
supabase-export-v2
1848242f284d08eb
By default, pickles created with :const:`pickle.DEFAULT_PROTOCOL` are used to serialize values. The version of the pickle protocol can be specified with the *protocol* parameter. Because of Python semantics, a shelf cannot know when a mutable persistent-dictionary entry is modified. By default modified objects are wr...
trusted_official_docs
CPython Docs
By default, pickles created with :const:`pickle.DEFAULT_PROTOCOL` are used to serialize values. The version of the pickle protocol can be specified with the *protocol* parameter. Because of Python semantics, a shelf cannot know when a mutable persistent-dictionary entry is modified. By default modified objects are wr...
By default, pickles created with :const:`pickle.DEFAULT_PROTOCOL` are used to serialize values. The version of the pickle protocol can be specified with the *protocol* parameter. Because of Python semantics, a shelf cannot know when a mutable persistent-dictionary entry is modified. By default modified objects are wr...
python, official-docs, cpython, P0
Local_Trusted_Corpus
caa57e5c-6b9d-4872-8750-99c90a108c05
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,904
supabase-export-v2
fe474e36b9615db3
A :class:`Shelf` object can also be used as a context manager, in which case it will be automatically closed when the :keyword:`with` block ends. .. versionchanged:: 3.2 Added the *keyencoding* parameter; previously, keys were always encoded in UTF-8.
trusted_official_docs
CPython Docs
A :class:`Shelf` object can also be used as a context manager, in which case it will be automatically closed when the :keyword:`with` block ends. .. versionchanged:: 3.2 Added the *keyencoding* parameter; previously, keys were always encoded in UTF-8.
A :class:`Shelf` object can also be used as a context manager, in which case it will be automatically closed when the :keyword:`with` block ends. .. versionchanged:: 3.2 Added the *keyencoding* parameter; previously, keys were always encoded in UTF-8.
python, official-docs, cpython, P0
Local_Trusted_Corpus
cdff1899-92ca-4236-aac6-db30df9a7665
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,910
supabase-export-v2
0fe2f1bff2fa4ae2
accomplished by calling one of :func:`!bsddb.hashopen`, :func:`!bsddb.btopen` or :func:`!bsddb.rnopen`. The optional *protocol*, *writeback*, *keyencoding*, *serializer* and *deserializer* parameters have the same interpretation as in :func:`~shelve.open`. .. versionchanged:: 3.15 Added the *serializer* and *deseriali...
trusted_official_docs
CPython Docs
accomplished by calling one of :func:`!bsddb.hashopen`, :func:`!bsddb.btopen` or :func:`!bsddb.rnopen`. The optional *protocol*, *writeback*, *keyencoding*, *serializer* and *deserializer* parameters have the same interpretation as in :func:`~shelve.open`. .. versionchanged:: 3.15 Added the *serializer* and *deseriali...
accomplished by calling one of :func:`!bsddb.hashopen`, :func:`!bsddb.btopen` or :func:`!bsddb.rnopen`. The optional *protocol*, *writeback*, *keyencoding*, *serializer* and *deserializer* parameters have the same interpretation as in :func:`~shelve.open`. .. versionchanged:: 3.15 Added the *serializer* and *deseriali...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d561b02c-3c12-4988-8ff0-6d3bd31b6fd1
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,912
supabase-export-v2
67df4ba8c3627719
.. class:: DbfilenameShelf(filename, flag='c', protocol=None, \ writeback=False, *, serializer=None, \ deserializer=None) A subclass of :class:`Shelf` which accepts a *filename* instead of a dict-like object. The underlying file will be opened using :func:`dbm.open`. By default, the file will be created and opened fo...
trusted_official_docs
CPython Docs
.. class:: DbfilenameShelf(filename, flag='c', protocol=None, \ writeback=False, *, serializer=None, \ deserializer=None) A subclass of :class:`Shelf` which accepts a *filename* instead of a dict-like object. The underlying file will be opened using :func:`dbm.open`. By default, the file will be created and opened fo...
.. class:: DbfilenameShelf(filename, flag='c', protocol=None, \ writeback=False, *, serializer=None, \ deserializer=None) A subclass of :class:`Shelf` which accepts a *filename* instead of a dict-like object. The underlying file will be opened using :func:`dbm.open`. By default, the file will be created and opened fo...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d8431d06-1256-4f0b-a2f0-6f6bf2a80e9e
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,920
supabase-export-v2
81d06a4a9b93859b
flag = key in d # true if the key exists klist = list(d.keys()) # a list of all existing keys (slow!) # as d was opened WITHOUT writeback=True, beware: d['xx'] = [0, 1, 2] # this works as expected, but... d['xx'].append(3) # *this doesn't!* -- d['xx'] is STILL [0, 1, 2]!
trusted_official_docs
CPython Docs
flag = key in d # true if the key exists klist = list(d.keys()) # a list of all existing keys (slow!) # as d was opened WITHOUT writeback=True, beware: d['xx'] = [0, 1, 2] # this works as expected, but... d['xx'].append(3) # *this doesn't!* -- d['xx'] is STILL [0, 1, 2]!
flag = key in d # true if the key exists klist = list(d.keys()) # a list of all existing keys (slow!) # as d was opened WITHOUT writeback=True, beware: d['xx'] = [0, 1, 2] # this works as expected, but... d['xx'].append(3) # *this doesn't!* -- d['xx'] is STILL [0, 1, 2]!
python, official-docs, cpython, P0
Local_Trusted_Corpus
de48997e-6170-416f-b2bc-f697e8c0cf82
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,872
supabase-export-v2
a8485ca414d8737e
The *deserializer* argument must be a callable which takes a serialized object given as a :class:`bytes` object and returns the corresponding object. A :exc:`ShelveError` is raised if *serializer* is given but *deserializer* is not, or vice-versa.
trusted_official_docs
CPython Docs
The *deserializer* argument must be a callable which takes a serialized object given as a :class:`bytes` object and returns the corresponding object. A :exc:`ShelveError` is raised if *serializer* is given but *deserializer* is not, or vice-versa.
The *deserializer* argument must be a callable which takes a serialized object given as a :class:`bytes` object and returns the corresponding object. A :exc:`ShelveError` is raised if *serializer* is given but *deserializer* is not, or vice-versa.
python, official-docs, cpython, P0
Local_Trusted_Corpus
f2dc438b-7ac6-4951-b848-1894253f40d7
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,881
supabase-export-v2
703320b6d82c00e8
is backed by :mod:`pickle`, it is insecure to load a shelf from an untrusted source. Like with pickle, loading a shelf can execute arbitrary code. Shelf objects support most of the methods and operations supported by dictionaries (except copying, constructors and operators ``|`` and ``|=``). This eases the transition f...
trusted_official_docs
CPython Docs
is backed by :mod:`pickle`, it is insecure to load a shelf from an untrusted source. Like with pickle, loading a shelf can execute arbitrary code. Shelf objects support most of the methods and operations supported by dictionaries (except copying, constructors and operators ``|`` and ``|=``). This eases the transition f...
is backed by :mod:`pickle`, it is insecure to load a shelf from an untrusted source. Like with pickle, loading a shelf can execute arbitrary code. Shelf objects support most of the methods and operations supported by dictionaries (except copying, constructors and operators ``|`` and ``|=``). This eases the transition f...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f7c83b58-e8b9-4740-b30a-0a4b63779e53
CPython Docs
file://datasets/cpython/Doc/library/shelve.rst
unknown
ae8725a0-99ed-4adc-9377-b92306969cc0
36,882
supabase-export-v2
9a81d9056f2422fb
operations supported by dictionaries (except copying, constructors and operators ``|`` and ``|=``). This eases the transition from dictionary based scripts to those requiring persistent storage. Two additional methods are supported:
trusted_official_docs
CPython Docs
operations supported by dictionaries (except copying, constructors and operators ``|`` and ``|=``). This eases the transition from dictionary based scripts to those requiring persistent storage. Two additional methods are supported:
operations supported by dictionaries (except copying, constructors and operators ``|`` and ``|=``). This eases the transition from dictionary based scripts to those requiring persistent storage. Two additional methods are supported:
python, official-docs, cpython, P0
Local_Trusted_Corpus
060af1ed-26e7-4fa7-b5ff-c0a8c1959491
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,947
supabase-export-v2
a03177c0a75fc64d
.. versionchanged:: 3.2 In previous versions, keyword arguments were not allowed, and *ident* was required. .. versionchanged:: 3.12 This function is restricted in subinterpreters. (Only code that runs in multiple interpreters is affected and the restriction is not relevant for most users.) This may only be called i...
trusted_official_docs
CPython Docs
.. versionchanged:: 3.2 In previous versions, keyword arguments were not allowed, and *ident* was required. .. versionchanged:: 3.12 This function is restricted in subinterpreters. (Only code that runs in multiple interpreters is affected and the restriction is not relevant for most users.) This may only be called i...
.. versionchanged:: 3.2 In previous versions, keyword arguments were not allowed, and *ident* was required. .. versionchanged:: 3.12 This function is restricted in subinterpreters. (Only code that runs in multiple interpreters is affected and the restriction is not relevant for most users.) This may only be called i...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0bb97352-d7c1-4eea-ae32-de0f2f72ca35
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,951
supabase-export-v2
03bf12ee6d36f952
:func:`openlog` will be called on the first :func:`syslog` call (if :func:`openlog` hasn't already been called), and *ident* and other :func:`openlog` parameters are reset to defaults. .. audit-event:: syslog.closelog "" syslog.closelog
trusted_official_docs
CPython Docs
:func:`openlog` will be called on the first :func:`syslog` call (if :func:`openlog` hasn't already been called), and *ident* and other :func:`openlog` parameters are reset to defaults. .. audit-event:: syslog.closelog "" syslog.closelog
:func:`openlog` will be called on the first :func:`syslog` call (if :func:`openlog` hasn't already been called), and *ident* and other :func:`openlog` parameters are reset to defaults. .. audit-event:: syslog.closelog "" syslog.closelog
python, official-docs, cpython, P0
Local_Trusted_Corpus
0fbf6c12-4c6e-4de5-80bc-37f8a9ce6c6c
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,937
supabase-export-v2
4e861e724dbcb748
.. function:: syslog(message) syslog(priority, message) Send the string *message* to the system logger. A trailing newline is added if necessary. Each message is tagged with a priority composed of a *facility* and a *level*. The optional *priority* argument, which defaults to :const:`LOG_INFO`, determines the messag...
trusted_official_docs
CPython Docs
.. function:: syslog(message) syslog(priority, message) Send the string *message* to the system logger. A trailing newline is added if necessary. Each message is tagged with a priority composed of a *facility* and a *level*. The optional *priority* argument, which defaults to :const:`LOG_INFO`, determines the messag...
.. function:: syslog(message) syslog(priority, message) Send the string *message* to the system logger. A trailing newline is added if necessary. Each message is tagged with a priority composed of a *facility* and a *level*. The optional *priority* argument, which defaults to :const:`LOG_INFO`, determines the messag...
python, official-docs, cpython, P0
Local_Trusted_Corpus
17f658ff-2c73-4f2b-aaa1-e1542283ee98
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,941
supabase-export-v2
8ef34de0c3528341
versions, :func:`openlog` would not be called automatically if it wasn't called prior to the call to :func:`syslog`, deferring to the syslog implementation to call ``openlog()``. .. versionchanged:: 3.12 This function is restricted in subinterpreters. (Only code that runs in multiple interpreters is affected and the ...
trusted_official_docs
CPython Docs
versions, :func:`openlog` would not be called automatically if it wasn't called prior to the call to :func:`syslog`, deferring to the syslog implementation to call ``openlog()``. .. versionchanged:: 3.12 This function is restricted in subinterpreters. (Only code that runs in multiple interpreters is affected and the ...
versions, :func:`openlog` would not be called automatically if it wasn't called prior to the call to :func:`syslog`, deferring to the syslog implementation to call ``openlog()``. .. versionchanged:: 3.12 This function is restricted in subinterpreters. (Only code that runs in multiple interpreters is affected and the ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1bbd1fe8-e0b6-4f85-bd19-0967020c4d3a
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,945
supabase-export-v2
a07c6c8fc79e6155
values to combine. The optional *facility* keyword argument (default is :const:`LOG_USER`) sets the default facility for messages which do not have a facility explicitly encoded. .. audit-event:: syslog.openlog ident,logoption,facility syslog.openlog
trusted_official_docs
CPython Docs
values to combine. The optional *facility* keyword argument (default is :const:`LOG_USER`) sets the default facility for messages which do not have a facility explicitly encoded. .. audit-event:: syslog.openlog ident,logoption,facility syslog.openlog
values to combine. The optional *facility* keyword argument (default is :const:`LOG_USER`) sets the default facility for messages which do not have a facility explicitly encoded. .. audit-event:: syslog.openlog ident,logoption,facility syslog.openlog
python, official-docs, cpython, P0
Local_Trusted_Corpus
1f536eff-8954-4d37-93d6-5f5deb90156a
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,954
supabase-export-v2
1e0aa0c6d3e617f6
.. function:: setlogmask(maskpri) Set the priority mask to *maskpri* and return the previous mask value. Calls to :func:`syslog` with a priority level not set in *maskpri* are ignored. The default is to log all priorities. The function ``LOG_MASK(pri)`` calculates the mask for the individual priority *pri*. The funct...
trusted_official_docs
CPython Docs
.. function:: setlogmask(maskpri) Set the priority mask to *maskpri* and return the previous mask value. Calls to :func:`syslog` with a priority level not set in *maskpri* are ignored. The default is to log all priorities. The function ``LOG_MASK(pri)`` calculates the mask for the individual priority *pri*. The funct...
.. function:: setlogmask(maskpri) Set the priority mask to *maskpri* and return the previous mask value. Calls to :func:`syslog` with a priority level not set in *maskpri* are ignored. The default is to log all priorities. The function ``LOG_MASK(pri)`` calculates the mask for the individual priority *pri*. The funct...
python, official-docs, cpython, P0
Local_Trusted_Corpus
261cb5c7-e12c-467f-9f95-90be04d77216
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,967
supabase-export-v2
bc349f1729d567d1
syslog.syslog('Processing started') if error: syslog.syslog(syslog.LOG_ERR, 'Processing started') An example of setting some log options, these would include the process ID in logged messages, and write the messages to the destination facility used for mail logging::
trusted_official_docs
CPython Docs
syslog.syslog('Processing started') if error: syslog.syslog(syslog.LOG_ERR, 'Processing started') An example of setting some log options, these would include the process ID in logged messages, and write the messages to the destination facility used for mail logging::
syslog.syslog('Processing started') if error: syslog.syslog(syslog.LOG_ERR, 'Processing started') An example of setting some log options, these would include the process ID in logged messages, and write the messages to the destination facility used for mail logging::
python, official-docs, cpython, P0
Local_Trusted_Corpus
5f21ef97-0019-49a3-b234-49b1c44fea7e
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,935
supabase-export-v2
ae20c97e689521a1
the system ``syslog`` family of routines. A pure Python library that can speak to a syslog server is available in the :mod:`logging.handlers` module as :class:`~logging.handlers.SysLogHandler`. The module defines the following functions:
trusted_official_docs
CPython Docs
the system ``syslog`` family of routines. A pure Python library that can speak to a syslog server is available in the :mod:`logging.handlers` module as :class:`~logging.handlers.SysLogHandler`. The module defines the following functions:
the system ``syslog`` family of routines. A pure Python library that can speak to a syslog server is available in the :mod:`logging.handlers` module as :class:`~logging.handlers.SysLogHandler`. The module defines the following functions:
python, official-docs, cpython, P0
Local_Trusted_Corpus
63541090-5c47-4d41-9e24-99e7ebcfbdc7
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,950
supabase-export-v2
72a396b93d3c3881
Reset the syslog module values and call the system library ``closelog()``. This causes the module to behave as it does when initially imported. For example, :func:`openlog` will be called on the first :func:`syslog` call (if :func:`openlog` hasn't already been called), and *ident* and other :func:`openlog` parameter...
trusted_official_docs
CPython Docs
Reset the syslog module values and call the system library ``closelog()``. This causes the module to behave as it does when initially imported. For example, :func:`openlog` will be called on the first :func:`syslog` call (if :func:`openlog` hasn't already been called), and *ident* and other :func:`openlog` parameter...
Reset the syslog module values and call the system library ``closelog()``. This causes the module to behave as it does when initially imported. For example, :func:`openlog` will be called on the first :func:`syslog` call (if :func:`openlog` hasn't already been called), and *ident* and other :func:`openlog` parameter...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7313acf0-dd6a-4814-ad47-349977cfebb0
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,955
supabase-export-v2
a50481e39bf03b1a
The function ``LOG_MASK(pri)`` calculates the mask for the individual priority *pri*. The function ``LOG_UPTO(pri)`` calculates the mask for all priorities up to and including *pri*. .. audit-event:: syslog.setlogmask maskpri syslog.setlogmask
trusted_official_docs
CPython Docs
The function ``LOG_MASK(pri)`` calculates the mask for the individual priority *pri*. The function ``LOG_UPTO(pri)`` calculates the mask for all priorities up to and including *pri*. .. audit-event:: syslog.setlogmask maskpri syslog.setlogmask
The function ``LOG_MASK(pri)`` calculates the mask for the individual priority *pri*. The function ``LOG_UPTO(pri)`` calculates the mask for all priorities up to and including *pri*. .. audit-event:: syslog.setlogmask maskpri syslog.setlogmask
python, official-docs, cpython, P0
Local_Trusted_Corpus
95b665a9-013d-4d05-873c-f402a9135037
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,944
supabase-export-v2
db3e2e5b86fa1c6b
options of subsequent :func:`syslog` calls can be set by calling :func:`openlog`. :func:`syslog` will call :func:`openlog` with no arguments if the log is not currently open. The optional *ident* keyword argument is a string which is prepended to every message, and defaults to ``sys.argv[0]`` with leading path compone...
trusted_official_docs
CPython Docs
options of subsequent :func:`syslog` calls can be set by calling :func:`openlog`. :func:`syslog` will call :func:`openlog` with no arguments if the log is not currently open. The optional *ident* keyword argument is a string which is prepended to every message, and defaults to ``sys.argv[0]`` with leading path compone...
options of subsequent :func:`syslog` calls can be set by calling :func:`openlog`. :func:`syslog` will call :func:`openlog` with no arguments if the log is not currently open. The optional *ident* keyword argument is a string which is prepended to every message, and defaults to ``sys.argv[0]`` with leading path compone...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9d8cf087-109c-48fd-bab2-fe40f2e764ba
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,968
supabase-export-v2
2384c1bd97797f35
setting some log options, these would include the process ID in logged messages, and write the messages to the destination facility used for mail logging:: syslog.openlog(logoption=syslog.LOG_PID, facility=syslog.LOG_MAIL) syslog.syslog('E-mail processing initiated...')
trusted_official_docs
CPython Docs
setting some log options, these would include the process ID in logged messages, and write the messages to the destination facility used for mail logging:: syslog.openlog(logoption=syslog.LOG_PID, facility=syslog.LOG_MAIL) syslog.syslog('E-mail processing initiated...')
setting some log options, these would include the process ID in logged messages, and write the messages to the destination facility used for mail logging:: syslog.openlog(logoption=syslog.LOG_PID, facility=syslog.LOG_MAIL) syslog.syslog('E-mail processing initiated...')
python, official-docs, cpython, P0
Local_Trusted_Corpus
a0f1b469-0caf-47aa-9818-03f35dddded2
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,942
supabase-export-v2
e95eca79816f0658
relevant for most users.) :func:`openlog` must be called in the main interpreter before :func:`syslog` may be used in a subinterpreter. Otherwise it will raise :exc:`RuntimeError`. .. function:: openlog([ident[, logoption[, facility]]])
trusted_official_docs
CPython Docs
relevant for most users.) :func:`openlog` must be called in the main interpreter before :func:`syslog` may be used in a subinterpreter. Otherwise it will raise :exc:`RuntimeError`. .. function:: openlog([ident[, logoption[, facility]]])
relevant for most users.) :func:`openlog` must be called in the main interpreter before :func:`syslog` may be used in a subinterpreter. Otherwise it will raise :exc:`RuntimeError`. .. function:: openlog([ident[, logoption[, facility]]])
python, official-docs, cpython, P0
Local_Trusted_Corpus
a7bd8c3d-e00d-4a46-9d7a-ee6da48b60f0
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,952
supabase-export-v2
0c5f729752ac1794
.. audit-event:: syslog.closelog "" syslog.closelog .. versionchanged:: 3.12 This function is restricted in subinterpreters. (Only code that runs in multiple interpreters is affected and the restriction is not relevant for most users.) This may only be called in the main interpreter. It will raise :exc:`RuntimeError...
trusted_official_docs
CPython Docs
.. audit-event:: syslog.closelog "" syslog.closelog .. versionchanged:: 3.12 This function is restricted in subinterpreters. (Only code that runs in multiple interpreters is affected and the restriction is not relevant for most users.) This may only be called in the main interpreter. It will raise :exc:`RuntimeError...
.. audit-event:: syslog.closelog "" syslog.closelog .. versionchanged:: 3.12 This function is restricted in subinterpreters. (Only code that runs in multiple interpreters is affected and the restriction is not relevant for most users.) This may only be called in the main interpreter. It will raise :exc:`RuntimeError...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b687f511-e01e-41b2-83ee-b3bebe214a30
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,959
supabase-export-v2
0ddad7190e7d67f2
Priority levels (high to low). .. data:: LOG_AUTH LOG_AUTHPRIV LOG_CRON LOG_DAEMON LOG_FTP LOG_INSTALL LOG_KERN LOG_LAUNCHD LOG_LPR LOG_MAIL LOG_NETINFO LOG_NEWS LOG_RAS LOG_REMOTEAUTH LOG_SYSLOG LOG_USER LOG_UUCP LOG_LOCAL0 LOG_LOCAL1 LOG_LOCAL2 LOG_LOCAL3 LOG_LOCAL4 LOG_LOCAL5 LOG_LOCAL6 LOG_L...
trusted_official_docs
CPython Docs
Priority levels (high to low). .. data:: LOG_AUTH LOG_AUTHPRIV LOG_CRON LOG_DAEMON LOG_FTP LOG_INSTALL LOG_KERN LOG_LAUNCHD LOG_LPR LOG_MAIL LOG_NETINFO LOG_NEWS LOG_RAS LOG_REMOTEAUTH LOG_SYSLOG LOG_USER LOG_UUCP LOG_LOCAL0 LOG_LOCAL1 LOG_LOCAL2 LOG_LOCAL3 LOG_LOCAL4 LOG_LOCAL5 LOG_LOCAL6 LOG_L...
Priority levels (high to low). .. data:: LOG_AUTH LOG_AUTHPRIV LOG_CRON LOG_DAEMON LOG_FTP LOG_INSTALL LOG_KERN LOG_LAUNCHD LOG_LPR LOG_MAIL LOG_NETINFO LOG_NEWS LOG_RAS LOG_REMOTEAUTH LOG_SYSLOG LOG_USER LOG_UUCP LOG_LOCAL0 LOG_LOCAL1 LOG_LOCAL2 LOG_LOCAL3 LOG_LOCAL4 LOG_LOCAL5 LOG_LOCAL6 LOG_L...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c269205c-3065-41d9-a567-47967f8f9cb5
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,933
supabase-export-v2
960a5e71f9dde428
This module provides an interface to the Unix ``syslog`` library routines. Refer to the Unix manual pages for a detailed description of the ``syslog`` facility. .. availability:: Unix, not WASI, not iOS.
trusted_official_docs
CPython Docs
This module provides an interface to the Unix ``syslog`` library routines. Refer to the Unix manual pages for a detailed description of the ``syslog`` facility. .. availability:: Unix, not WASI, not iOS.
This module provides an interface to the Unix ``syslog`` library routines. Refer to the Unix manual pages for a detailed description of the ``syslog`` facility. .. availability:: Unix, not WASI, not iOS.
python, official-docs, cpython, P0
Local_Trusted_Corpus
cc823f10-fced-4ef7-ba3d-4280638a6440
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,938
supabase-export-v2
9fea0c226ffe9648
the message priority. If the facility is not encoded in *priority* using logical-or (``LOG_INFO | LOG_USER``), the value given in the :func:`openlog` call is used. If :func:`openlog` has not been called prior to the call to :func:`syslog`, :func:`openlog` will be called with no arguments.
trusted_official_docs
CPython Docs
the message priority. If the facility is not encoded in *priority* using logical-or (``LOG_INFO | LOG_USER``), the value given in the :func:`openlog` call is used. If :func:`openlog` has not been called prior to the call to :func:`syslog`, :func:`openlog` will be called with no arguments.
the message priority. If the facility is not encoded in *priority* using logical-or (``LOG_INFO | LOG_USER``), the value given in the :func:`openlog` call is used. If :func:`openlog` has not been called prior to the call to :func:`syslog`, :func:`openlog` will be called with no arguments.
python, official-docs, cpython, P0
Local_Trusted_Corpus
cfe8671d-6f81-4165-8269-7528d5557f52
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,960
supabase-export-v2
0d8ef37be9cdb733
LOG_AUTH LOG_AUTHPRIV LOG_CRON LOG_DAEMON LOG_FTP LOG_INSTALL LOG_KERN LOG_LAUNCHD LOG_LPR LOG_MAIL LOG_NETINFO LOG_NEWS LOG_RAS LOG_REMOTEAUTH LOG_SYSLOG LOG_USER LOG_UUCP LOG_LOCAL0 LOG_LOCAL1 LOG_LOCAL2 LOG_LOCAL3 LOG_LOCAL4 LOG_LOCAL5 LOG_LOCAL6 LOG_LOCAL7 Facilities, depending on availability in ``<syslog.h>`` for...
trusted_official_docs
CPython Docs
LOG_AUTH LOG_AUTHPRIV LOG_CRON LOG_DAEMON LOG_FTP LOG_INSTALL LOG_KERN LOG_LAUNCHD LOG_LPR LOG_MAIL LOG_NETINFO LOG_NEWS LOG_RAS LOG_REMOTEAUTH LOG_SYSLOG LOG_USER LOG_UUCP LOG_LOCAL0 LOG_LOCAL1 LOG_LOCAL2 LOG_LOCAL3 LOG_LOCAL4 LOG_LOCAL5 LOG_LOCAL6 LOG_LOCAL7 Facilities, depending on availability in ``<syslog.h>`` for...
LOG_AUTH LOG_AUTHPRIV LOG_CRON LOG_DAEMON LOG_FTP LOG_INSTALL LOG_KERN LOG_LAUNCHD LOG_LPR LOG_MAIL LOG_NETINFO LOG_NEWS LOG_RAS LOG_REMOTEAUTH LOG_SYSLOG LOG_USER LOG_UUCP LOG_LOCAL0 LOG_LOCAL1 LOG_LOCAL2 LOG_LOCAL3 LOG_LOCAL4 LOG_LOCAL5 LOG_LOCAL6 LOG_LOCAL7 Facilities, depending on availability in ``<syslog.h>`` for...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e047bb21-221d-4329-aef3-004812a748ab
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,943
supabase-export-v2
2cb1ded1dcf510e4
.. function:: openlog([ident[, logoption[, facility]]]) Logging options of subsequent :func:`syslog` calls can be set by calling :func:`openlog`. :func:`syslog` will call :func:`openlog` with no arguments if the log is not currently open.
trusted_official_docs
CPython Docs
.. function:: openlog([ident[, logoption[, facility]]]) Logging options of subsequent :func:`syslog` calls can be set by calling :func:`openlog`. :func:`syslog` will call :func:`openlog` with no arguments if the log is not currently open.
.. function:: openlog([ident[, logoption[, facility]]]) Logging options of subsequent :func:`syslog` calls can be set by calling :func:`openlog`. :func:`syslog` will call :func:`openlog` with no arguments if the log is not currently open.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e651264a-ccc1-4a32-b3d9-c55be2645f0e
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,940
supabase-export-v2
44e080de31a0ce51
.. audit-event:: syslog.syslog priority,message syslog.syslog .. versionchanged:: 3.2 In previous versions, :func:`openlog` would not be called automatically if it wasn't called prior to the call to :func:`syslog`, deferring to the syslog implementation to call ``openlog()``.
trusted_official_docs
CPython Docs
.. audit-event:: syslog.syslog priority,message syslog.syslog .. versionchanged:: 3.2 In previous versions, :func:`openlog` would not be called automatically if it wasn't called prior to the call to :func:`syslog`, deferring to the syslog implementation to call ``openlog()``.
.. audit-event:: syslog.syslog priority,message syslog.syslog .. versionchanged:: 3.2 In previous versions, :func:`openlog` would not be called automatically if it wasn't called prior to the call to :func:`syslog`, deferring to the syslog implementation to call ``openlog()``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
f50de83b-796e-4309-b1e2-0782198db11f
CPython Docs
file://datasets/cpython/Doc/library/syslog.rst
unknown
e2a18d1d-bbdb-4f63-960e-28a3a323488a
36,934
supabase-export-v2
0fb697b387dece72
.. availability:: Unix, not WASI, not iOS. This module wraps the system ``syslog`` family of routines. A pure Python library that can speak to a syslog server is available in the :mod:`logging.handlers` module as :class:`~logging.handlers.SysLogHandler`.
trusted_official_docs
CPython Docs
.. availability:: Unix, not WASI, not iOS. This module wraps the system ``syslog`` family of routines. A pure Python library that can speak to a syslog server is available in the :mod:`logging.handlers` module as :class:`~logging.handlers.SysLogHandler`.
.. availability:: Unix, not WASI, not iOS. This module wraps the system ``syslog`` family of routines. A pure Python library that can speak to a syslog server is available in the :mod:`logging.handlers` module as :class:`~logging.handlers.SysLogHandler`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
44c2046f-ab25-4012-bf78-4496f119f272
CPython Docs
file://datasets/cpython/Doc/library/cgitb.rst
unknown
355911c9-4b32-4287-9956-148037f821f1
36,973
supabase-export-v2
f64de0eb8defd84c
part of the Python standard library. It was :ref:`removed in Python 3.13 <whatsnew313-pep594>` after being deprecated in Python 3.11. The removal was decided in :pep:`594`. A fork of the module on PyPI can now be used instead: :pypi:`legacy-cgi`. This is a copy of the cgi module, no longer maintained or supported by th...
trusted_official_docs
CPython Docs
part of the Python standard library. It was :ref:`removed in Python 3.13 <whatsnew313-pep594>` after being deprecated in Python 3.11. The removal was decided in :pep:`594`. A fork of the module on PyPI can now be used instead: :pypi:`legacy-cgi`. This is a copy of the cgi module, no longer maintained or supported by th...
part of the Python standard library. It was :ref:`removed in Python 3.13 <whatsnew313-pep594>` after being deprecated in Python 3.11. The removal was decided in :pep:`594`. A fork of the module on PyPI can now be used instead: :pypi:`legacy-cgi`. This is a copy of the cgi module, no longer maintained or supported by th...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b7d4c86b-1ead-4fa2-97ec-5cb973315b63
CPython Docs
file://datasets/cpython/Doc/library/cgitb.rst
unknown
355911c9-4b32-4287-9956-148037f821f1
36,974
supabase-export-v2
b9cc9d4a004ce162
PyPI can now be used instead: :pypi:`legacy-cgi`. This is a copy of the cgi module, no longer maintained or supported by the core Python team. The last version of Python that provided the :mod:`!cgitb` module was `Python 3.12 <https://docs.python.org/3.12/library/cgitb.html>`_.
trusted_official_docs
CPython Docs
PyPI can now be used instead: :pypi:`legacy-cgi`. This is a copy of the cgi module, no longer maintained or supported by the core Python team. The last version of Python that provided the :mod:`!cgitb` module was `Python 3.12 <https://docs.python.org/3.12/library/cgitb.html>`_.
PyPI can now be used instead: :pypi:`legacy-cgi`. This is a copy of the cgi module, no longer maintained or supported by the core Python team. The last version of Python that provided the :mod:`!cgitb` module was `Python 3.12 <https://docs.python.org/3.12/library/cgitb.html>`_.
python, official-docs, cpython, P0
Local_Trusted_Corpus
03a823b6-c3d4-4c22-be3b-22330f269b25
CPython Docs
file://datasets/cpython/Doc/library/errno.rst
unknown
781c0279-726d-42fa-8741-19a2b7eb3dc7
36,981
supabase-export-v2
010521223214b00f
Dictionary providing a mapping from the errno value to the string name in the underlying system. For instance, ``errno.errorcode[errno.EPERM]`` maps to ``'EPERM'``. To translate a numeric error code to an error message, use :func:`os.strerror`.
trusted_official_docs
CPython Docs
Dictionary providing a mapping from the errno value to the string name in the underlying system. For instance, ``errno.errorcode[errno.EPERM]`` maps to ``'EPERM'``. To translate a numeric error code to an error message, use :func:`os.strerror`.
Dictionary providing a mapping from the errno value to the string name in the underlying system. For instance, ``errno.errorcode[errno.EPERM]`` maps to ``'EPERM'``. To translate a numeric error code to an error message, use :func:`os.strerror`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
9330b11f-9628-4073-94d0-f2fcc4b9a156
CPython Docs
file://datasets/cpython/Doc/library/errno.rst
unknown
781c0279-726d-42fa-8741-19a2b7eb3dc7
36,978
supabase-export-v2
265bd439c32886cd
---------------- This module makes available standard ``errno`` system symbols. The value of each symbol is the corresponding integer value. The names and descriptions are borrowed from :file:`linux/include/errno.h`, which should be all-inclusive.
trusted_official_docs
CPython Docs
---------------- This module makes available standard ``errno`` system symbols. The value of each symbol is the corresponding integer value. The names and descriptions are borrowed from :file:`linux/include/errno.h`, which should be all-inclusive.
---------------- This module makes available standard ``errno`` system symbols. The value of each symbol is the corresponding integer value. The names and descriptions are borrowed from :file:`linux/include/errno.h`, which should be all-inclusive.
python, official-docs, cpython, P0
Local_Trusted_Corpus
aa0717c5-ac6d-4e69-87a0-5ccba1746806
CPython Docs
file://datasets/cpython/Doc/library/errno.rst
unknown
781c0279-726d-42fa-8741-19a2b7eb3dc7
36,982
supabase-export-v2
b9a63176ccab16b7
To translate a numeric error code to an error message, use :func:`os.strerror`. Of the following list, symbols that are not used on the current platform are not defined by the module. The specific list of defined symbols is available as ``errno.errorcode.keys()``. Symbols available can include:
trusted_official_docs
CPython Docs
To translate a numeric error code to an error message, use :func:`os.strerror`. Of the following list, symbols that are not used on the current platform are not defined by the module. The specific list of defined symbols is available as ``errno.errorcode.keys()``. Symbols available can include:
To translate a numeric error code to an error message, use :func:`os.strerror`. Of the following list, symbols that are not used on the current platform are not defined by the module. The specific list of defined symbols is available as ``errno.errorcode.keys()``. Symbols available can include:
python, official-docs, cpython, P0
Local_Trusted_Corpus
0d2fd430-a64e-4870-bfd9-2f52d238c6ed
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,080
supabase-export-v2
125675216860f594
The :mod:`!profile` module is deprecated and will be removed in Python 3.17. Use :mod:`profiling.tracing` instead. The :mod:`!profile` module provides a pure Python implementation of a deterministic profiler. While useful for understanding profiler internals or extending profiler behavior through subclassing, its pure ...
trusted_official_docs
CPython Docs
The :mod:`!profile` module is deprecated and will be removed in Python 3.17. Use :mod:`profiling.tracing` instead. The :mod:`!profile` module provides a pure Python implementation of a deterministic profiler. While useful for understanding profiler internals or extending profiler behavior through subclassing, its pure ...
The :mod:`!profile` module is deprecated and will be removed in Python 3.17. Use :mod:`profiling.tracing` instead. The :mod:`!profile` module provides a pure Python implementation of a deterministic profiler. While useful for understanding profiler internals or extending profiler behavior through subclassing, its pure ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0e275bc7-032d-49a5-acc4-0e846f897066
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,103
supabase-export-v2
2d38c20eaa63b167
the duration of each unit of time. For example, if the timer returns times measured in thousands of seconds, the time unit would be ``.001``. Directly using the :class:`Profile` class allows formatting profile results without writing the profile data to a file::
trusted_official_docs
CPython Docs
the duration of each unit of time. For example, if the timer returns times measured in thousands of seconds, the time unit would be ``.001``. Directly using the :class:`Profile` class allows formatting profile results without writing the profile data to a file::
the duration of each unit of time. For example, if the timer returns times measured in thousands of seconds, the time unit would be ``.001``. Directly using the :class:`Profile` class allows formatting profile results without writing the profile data to a file::
python, official-docs, cpython, P0
Local_Trusted_Corpus
1041f61e-21fa-4826-8b89-5fc75e8a9b85
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,095
supabase-export-v2
c4701b5b6b5108f6
exec(command, __main__.__dict__, __main__.__dict__) and gathers profiling statistics from the execution. If no file name is present, then this function automatically creates a :class:`~pstats.Stats` instance and prints a simple profiling report. If the sort value is specified, it is passed to this :class:`~pstats.St...
trusted_official_docs
CPython Docs
exec(command, __main__.__dict__, __main__.__dict__) and gathers profiling statistics from the execution. If no file name is present, then this function automatically creates a :class:`~pstats.Stats` instance and prints a simple profiling report. If the sort value is specified, it is passed to this :class:`~pstats.St...
exec(command, __main__.__dict__, __main__.__dict__) and gathers profiling statistics from the execution. If no file name is present, then this function automatically creates a :class:`~pstats.Stats` instance and prints a simple profiling report. If the sort value is specified, it is passed to this :class:`~pstats.St...
python, official-docs, cpython, P0
Local_Trusted_Corpus
133935a1-0a59-4fc1-8b10-c70bf531e783
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,105
supabase-export-v2
e151cd580455ef65
import profiling.tracing import pstats import io from pstats import SortKey pr = profiling.tracing.Profile() pr.enable() # ... do something ... pr.disable() s = io.StringIO() sortby = SortKey.CUMULATIVE ps = pstats.Stats(pr, stream=s).sort_stats(sortby) ps.print_stats() print(s.getvalue())
trusted_official_docs
CPython Docs
import profiling.tracing import pstats import io from pstats import SortKey pr = profiling.tracing.Profile() pr.enable() # ... do something ... pr.disable() s = io.StringIO() sortby = SortKey.CUMULATIVE ps = pstats.Stats(pr, stream=s).sort_stats(sortby) ps.print_stats() print(s.getvalue())
import profiling.tracing import pstats import io from pstats import SortKey pr = profiling.tracing.Profile() pr.enable() # ... do something ... pr.disable() s = io.StringIO() sortby = SortKey.CUMULATIVE ps = pstats.Stats(pr, stream=s).sort_stats(sortby) ps.print_stats() print(s.getvalue())
python, official-docs, cpython, P0
Local_Trusted_Corpus
18d9c370-8671-4abd-8a0a-265682384fd9
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,166
supabase-export-v2
a27ab03b55db275a
possible. For the best results with a custom timer, it might be necessary to hard-code it in the C source of the internal :mod:`!_lsprof` module. Python 3.3 adds several new functions in :mod:`time` that can be used to make precise measurements of process or wall-clock time. For example, see :func:`time.perf_counter`.
trusted_official_docs
CPython Docs
possible. For the best results with a custom timer, it might be necessary to hard-code it in the C source of the internal :mod:`!_lsprof` module. Python 3.3 adds several new functions in :mod:`time` that can be used to make precise measurements of process or wall-clock time. For example, see :func:`time.perf_counter`.
possible. For the best results with a custom timer, it might be necessary to hard-code it in the C source of the internal :mod:`!_lsprof` module. Python 3.3 adds several new functions in :mod:`time` that can be used to make precise measurements of process or wall-clock time. For example, see :func:`time.perf_counter`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
21f81cc7-c063-45a6-9b2a-8e5166906637
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,140
supabase-export-v2
a2f04a54b45e2e45
typical applications. The result is that deterministic profiling is not that expensive, yet provides extensive run time statistics about the execution of a Python program. Call count statistics can be used to identify bugs in code (surprising counts), and to identify possible inline-expansion points (high call counts)....
trusted_official_docs
CPython Docs
typical applications. The result is that deterministic profiling is not that expensive, yet provides extensive run time statistics about the execution of a Python program. Call count statistics can be used to identify bugs in code (surprising counts), and to identify possible inline-expansion points (high call counts)....
typical applications. The result is that deterministic profiling is not that expensive, yet provides extensive run time statistics about the execution of a Python program. Call count statistics can be used to identify bugs in code (surprising counts), and to identify possible inline-expansion points (high call counts)....
python, official-docs, cpython, P0
Local_Trusted_Corpus
27fe633c-3aaf-44b7-966b-65025f6a6126
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,150
supabase-export-v2
8ff019892f7fe525
your computer is *very* fast, or your timer function has poor resolution, you might have to pass 100000, or even 1000000, to get consistent results. When you have a consistent answer, there are three ways you can use it::
trusted_official_docs
CPython Docs
your computer is *very* fast, or your timer function has poor resolution, you might have to pass 100000, or even 1000000, to get consistent results. When you have a consistent answer, there are three ways you can use it::
your computer is *very* fast, or your timer function has poor resolution, you might have to pass 100000, or even 1000000, to get consistent results. When you have a consistent answer, there are three ways you can use it::
python, official-docs, cpython, P0
Local_Trusted_Corpus
29211085-23f3-412f-86a6-df11651a13fb
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,096
supabase-export-v2
653bab56af46e703
prints a simple profiling report. If the sort value is specified, it is passed to this :class:`~pstats.Stats` instance to control how the results are sorted. .. function:: runctx(command, globals, locals, filename=None, sort=-1)
trusted_official_docs
CPython Docs
prints a simple profiling report. If the sort value is specified, it is passed to this :class:`~pstats.Stats` instance to control how the results are sorted. .. function:: runctx(command, globals, locals, filename=None, sort=-1)
prints a simple profiling report. If the sort value is specified, it is passed to this :class:`~pstats.Stats` instance to control how the results are sorted. .. function:: runctx(command, globals, locals, filename=None, sort=-1)
python, official-docs, cpython, P0
Local_Trusted_Corpus
354ae93c-ddd7-4298-b106-d35fd726e9f3
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,162
supabase-export-v2
c88d91fc95018f72
a single time number, or the list of returned numbers has length 2, then you will get an especially fast version of the dispatch routine. Be warned that you should calibrate the profiler class for the timer function that you choose (see :ref:`profile-calibration`). For most machines, a timer that returns a lone integ...
trusted_official_docs
CPython Docs
a single time number, or the list of returned numbers has length 2, then you will get an especially fast version of the dispatch routine. Be warned that you should calibrate the profiler class for the timer function that you choose (see :ref:`profile-calibration`). For most machines, a timer that returns a lone integ...
a single time number, or the list of returned numbers has length 2, then you will get an especially fast version of the dispatch routine. Be warned that you should calibrate the profiler class for the timer function that you choose (see :ref:`profile-calibration`). For most machines, a timer that returns a lone integ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
38a98569-6b81-422b-be5f-77db096784c9
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,161
supabase-export-v2
dce60c50bfce2951
The resulting profiler will then call ``your_time_func``. Depending on whether you are using :class:`profile.Profile` or :class:`profiling.tracing.Profile`, ``your_time_func``'s return value will be interpreted differently: :class:`profile.Profile` ``your_time_func`` should return a single number, or a list of numbers...
trusted_official_docs
CPython Docs
The resulting profiler will then call ``your_time_func``. Depending on whether you are using :class:`profile.Profile` or :class:`profiling.tracing.Profile`, ``your_time_func``'s return value will be interpreted differently: :class:`profile.Profile` ``your_time_func`` should return a single number, or a list of numbers...
The resulting profiler will then call ``your_time_func``. Depending on whether you are using :class:`profile.Profile` or :class:`profiling.tracing.Profile`, ``your_time_func``'s return value will be interpreted differently: :class:`profile.Profile` ``your_time_func`` should return a single number, or a list of numbers...
python, official-docs, cpython, P0
Local_Trusted_Corpus
429105bf-683d-45f5-b87d-7308fd3b5e26
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,144
supabase-export-v2
170f3813cce5ac15
in this fashion is typically less than the accuracy of the clock (less than one clock tick), but it *can* accumulate and become very significant. The problem is more important with the deprecated :mod:`!profile` module than with the lower-overhead :mod:`profiling.tracing`. For this reason, :mod:`!profile` provides a me...
trusted_official_docs
CPython Docs
in this fashion is typically less than the accuracy of the clock (less than one clock tick), but it *can* accumulate and become very significant. The problem is more important with the deprecated :mod:`!profile` module than with the lower-overhead :mod:`profiling.tracing`. For this reason, :mod:`!profile` provides a me...
in this fashion is typically less than the accuracy of the clock (less than one clock tick), but it *can* accumulate and become very significant. The problem is more important with the deprecated :mod:`!profile` module than with the lower-overhead :mod:`profiling.tracing`. For this reason, :mod:`!profile` provides a me...
python, official-docs, cpython, P0
Local_Trusted_Corpus
433f0d14-5946-4ed3-8a96-f3fe81fc49d2
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,134
supabase-export-v2
0e55c2ca5ba56607
**Calibration support.** The :mod:`!profile` module supports calibration to compensate for profiling overhead. This is not needed in :mod:`profiling.tracing` because the C implementation has negligible overhead. **Custom timers.** Both modules support custom timers, but :mod:`!profile` accepts timer functions that retu...
trusted_official_docs
CPython Docs
**Calibration support.** The :mod:`!profile` module supports calibration to compensate for profiling overhead. This is not needed in :mod:`profiling.tracing` because the C implementation has negligible overhead. **Custom timers.** Both modules support custom timers, but :mod:`!profile` accepts timer functions that retu...
**Calibration support.** The :mod:`!profile` module supports calibration to compensate for profiling overhead. This is not needed in :mod:`profiling.tracing` because the C implementation has negligible overhead. **Custom timers.** Both modules support custom timers, but :mod:`!profile` accepts timer functions that retu...
python, official-docs, cpython, P0
Local_Trusted_Corpus
44ab68eb-4fc5-4561-89a4-bd6beca49295
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,163
supabase-export-v2
8fe69220d9d6de88
in the cleanest fashion, derive a class and hardwire a replacement dispatch method that best handles your timer call, along with the appropriate calibration constant. :class:`profiling.tracing.Profile` ``your_time_func`` should return a single number. If it returns integers, you can also invoke the class constructor ...
trusted_official_docs
CPython Docs
in the cleanest fashion, derive a class and hardwire a replacement dispatch method that best handles your timer call, along with the appropriate calibration constant. :class:`profiling.tracing.Profile` ``your_time_func`` should return a single number. If it returns integers, you can also invoke the class constructor ...
in the cleanest fashion, derive a class and hardwire a replacement dispatch method that best handles your timer call, along with the appropriate calibration constant. :class:`profiling.tracing.Profile` ``your_time_func`` should return a single number. If it returns integers, you can also invoke the class constructor ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
49e01eb9-4759-4661-a1fa-2552d41c65c2
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,153
supabase-export-v2
d8b35e7c2f8b428e
# 1. Apply computed bias to all Profile instances created hereafter. profile.Profile.bias = your_computed_bias # 2. Apply computed bias to a specific Profile instance. pr = profile.Profile() pr.bias = your_computed_bias
trusted_official_docs
CPython Docs
# 1. Apply computed bias to all Profile instances created hereafter. profile.Profile.bias = your_computed_bias # 2. Apply computed bias to a specific Profile instance. pr = profile.Profile() pr.bias = your_computed_bias
# 1. Apply computed bias to all Profile instances created hereafter. profile.Profile.bias = your_computed_bias # 2. Apply computed bias to a specific Profile instance. pr = profile.Profile() pr.bias = your_computed_bias
python, official-docs, cpython, P0
Local_Trusted_Corpus
51e7cd25-1632-4da0-b671-fe340884d61b
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,138
supabase-export-v2
68c4034f11de8451
What is deterministic profiling? ================================ :dfn:`Deterministic profiling` is meant to reflect the fact that all *function call*, *function return*, and *exception* events are monitored, and precise timings are made for the intervals between these events (during which time the user's code is execu...
trusted_official_docs
CPython Docs
What is deterministic profiling? ================================ :dfn:`Deterministic profiling` is meant to reflect the fact that all *function call*, *function return*, and *exception* events are monitored, and precise timings are made for the intervals between these events (during which time the user's code is execu...
What is deterministic profiling? ================================ :dfn:`Deterministic profiling` is meant to reflect the fact that all *function call*, *function return*, and *exception* events are monitored, and precise timings are made for the intervals between these events (during which time the user's code is execu...
python, official-docs, cpython, P0
Local_Trusted_Corpus
59e40418-7add-4588-a4b9-97bf7d0f2fca
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,119
supabase-export-v2
1beafa31330a1715
Create a :class:`~pstats.Stats` object based on the current profile and print the results to stdout. The *sort* parameter specifies the sorting order of the displayed statistics. It accepts a single key or a tuple of keys to enable multi-level sorting, as in :meth:`pstats.Stats.sort_stats`.
trusted_official_docs
CPython Docs
Create a :class:`~pstats.Stats` object based on the current profile and print the results to stdout. The *sort* parameter specifies the sorting order of the displayed statistics. It accepts a single key or a tuple of keys to enable multi-level sorting, as in :meth:`pstats.Stats.sort_stats`.
Create a :class:`~pstats.Stats` object based on the current profile and print the results to stdout. The *sort* parameter specifies the sorting order of the displayed statistics. It accepts a single key or a tuple of keys to enable multi-level sorting, as in :meth:`pstats.Stats.sort_stats`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
695aeb4d-4893-4698-a1d8-74fc9ca07ec8
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,143
supabase-export-v2
69db5892ff2b6653
clock. If enough measurements are taken, then the "error" will tend to average out. Unfortunately, removing this first error induces a second source of error. The second problem is that it "takes a while" from when an event is dispatched until the profiler's call to get the time actually *gets* the state of the clock. ...
trusted_official_docs
CPython Docs
clock. If enough measurements are taken, then the "error" will tend to average out. Unfortunately, removing this first error induces a second source of error. The second problem is that it "takes a while" from when an event is dispatched until the profiler's call to get the time actually *gets* the state of the clock. ...
clock. If enough measurements are taken, then the "error" will tend to average out. Unfortunately, removing this first error induces a second source of error. The second problem is that it "takes a while" from when an event is dispatched until the profiler's call to get the time actually *gets* the state of the clock. ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6e10d097-ad5b-4866-9bc9-071578345162
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,081
supabase-export-v2
2bc512d419a29d61
While useful for understanding profiler internals or extending profiler behavior through subclassing, its pure Python implementation introduces significant overhead compared to the C-based :mod:`profiling.tracing` module. For most profiling tasks, use:
trusted_official_docs
CPython Docs
While useful for understanding profiler internals or extending profiler behavior through subclassing, its pure Python implementation introduces significant overhead compared to the C-based :mod:`profiling.tracing` module. For most profiling tasks, use:
While useful for understanding profiler internals or extending profiler behavior through subclassing, its pure Python implementation introduces significant overhead compared to the C-based :mod:`profiling.tracing` module. For most profiling tasks, use:
python, official-docs, cpython, P0
Local_Trusted_Corpus
756019c9-02a5-4bc7-b285-502eed2a56ae
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,133
supabase-export-v2
bd0b5eb5964a42f7
**Higher overhead.** The pure Python implementation is significantly slower than the C implementation, making it unsuitable for profiling long-running programs or performance-sensitive code. **Calibration support.** The :mod:`!profile` module supports calibration to compensate for profiling overhead. This is not needed...
trusted_official_docs
CPython Docs
**Higher overhead.** The pure Python implementation is significantly slower than the C implementation, making it unsuitable for profiling long-running programs or performance-sensitive code. **Calibration support.** The :mod:`!profile` module supports calibration to compensate for profiling overhead. This is not needed...
**Higher overhead.** The pure Python implementation is significantly slower than the C implementation, making it unsuitable for profiling long-running programs or performance-sensitive code. **Calibration support.** The :mod:`!profile` module supports calibration to compensate for profiling overhead. This is not needed...
python, official-docs, cpython, P0
Local_Trusted_Corpus
77dce6e8-c3eb-421e-bfc9-13006c757e6e
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,148
supabase-export-v2
d00cbeff2d3222bd
import profile pr = profile.Profile() for i in range(5): print(pr.calibrate(10000)) The method executes the number of Python calls given by the argument, directly and again under the profiler, measuring the time for both. It then computes the hidden overhead per profiler event, and returns that as a float. For example,...
trusted_official_docs
CPython Docs
import profile pr = profile.Profile() for i in range(5): print(pr.calibrate(10000)) The method executes the number of Python calls given by the argument, directly and again under the profiler, measuring the time for both. It then computes the hidden overhead per profiler event, and returns that as a float. For example,...
import profile pr = profile.Profile() for i in range(5): print(pr.calibrate(10000)) The method executes the number of Python calls given by the argument, directly and again under the profiler, measuring the time for both. It then computes the hidden overhead per profiler event, and returns that as a float. For example,...
python, official-docs, cpython, P0
Local_Trusted_Corpus
84ba70c1-df9d-453e-b6c4-c0330c5ee66d
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,135
supabase-export-v2
bac55ae5087607fa
timers.** Both modules support custom timers, but :mod:`!profile` accepts timer functions that return tuples (like :func:`os.times`), while :mod:`profiling.tracing` requires a function returning a single number. **Subclassing.** The pure Python implementation is easier to subclass and extend for custom profiling behavi...
trusted_official_docs
CPython Docs
timers.** Both modules support custom timers, but :mod:`!profile` accepts timer functions that return tuples (like :func:`os.times`), while :mod:`profiling.tracing` requires a function returning a single number. **Subclassing.** The pure Python implementation is easier to subclass and extend for custom profiling behavi...
timers.** Both modules support custom timers, but :mod:`!profile` accepts timer functions that return tuples (like :func:`os.times`), while :mod:`profiling.tracing` requires a function returning a single number. **Subclassing.** The pure Python implementation is easier to subclass and extend for custom profiling behavi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
92fea8cf-efbb-42e2-846f-514e702e733e
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,097
supabase-export-v2
a986bf9e97375fc5
.. function:: runctx(command, globals, locals, filename=None, sort=-1) This function is similar to :func:`run`, with added arguments to supply the globals and locals mappings for the *command* string. This routine executes::
trusted_official_docs
CPython Docs
.. function:: runctx(command, globals, locals, filename=None, sort=-1) This function is similar to :func:`run`, with added arguments to supply the globals and locals mappings for the *command* string. This routine executes::
.. function:: runctx(command, globals, locals, filename=None, sort=-1) This function is similar to :func:`run`, with added arguments to supply the globals and locals mappings for the *command* string. This routine executes::
python, official-docs, cpython, P0
Local_Trusted_Corpus
a7354c46-5ad5-4884-b258-8f2a8f24ffb5
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,149
supabase-export-v2
71c6b02a6ff3ac1f
a float. For example, on a 1.8Ghz Intel Core i5 running macOS, and using Python's time.process_time() as the timer, the magical number is about 4.04e-6. The object of this exercise is to get a fairly consistent result. If your computer is *very* fast, or your timer function has poor resolution, you might have to pass 1...
trusted_official_docs
CPython Docs
a float. For example, on a 1.8Ghz Intel Core i5 running macOS, and using Python's time.process_time() as the timer, the magical number is about 4.04e-6. The object of this exercise is to get a fairly consistent result. If your computer is *very* fast, or your timer function has poor resolution, you might have to pass 1...
a float. For example, on a 1.8Ghz Intel Core i5 running macOS, and using Python's time.process_time() as the timer, the magical number is about 4.04e-6. The object of this exercise is to get a fairly consistent result. If your computer is *very* fast, or your timer function has poor resolution, you might have to pass 1...
python, official-docs, cpython, P0
Local_Trusted_Corpus
af1ab80b-d3e0-42b2-9fc0-3ae3812fe6d6
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,146
supabase-export-v2
29bec1b0c9f6f3eb
Calibration =========== The profiler of the :mod:`!profile` module subtracts a constant from each event handling time to compensate for the overhead of calling the time function, and socking away the results. By default, the constant is 0. The following procedure can be used to obtain a better constant for a given plat...
trusted_official_docs
CPython Docs
Calibration =========== The profiler of the :mod:`!profile` module subtracts a constant from each event handling time to compensate for the overhead of calling the time function, and socking away the results. By default, the constant is 0. The following procedure can be used to obtain a better constant for a given plat...
Calibration =========== The profiler of the :mod:`!profile` module subtracts a constant from each event handling time to compensate for the overhead of calling the time function, and socking away the results. By default, the constant is 0. The following procedure can be used to obtain a better constant for a given plat...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b1881ddd-253d-4143-b8f8-7cea319bc3bc
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,106
supabase-export-v2
ecec6e6491c7b9bf
pr = profiling.tracing.Profile() pr.enable() # ... do something ... pr.disable() s = io.StringIO() sortby = SortKey.CUMULATIVE ps = pstats.Stats(pr, stream=s).sort_stats(sortby) ps.print_stats() print(s.getvalue()) The :class:`Profile` class can also be used as a context manager (supported only in :mod:`profiling.trac...
trusted_official_docs
CPython Docs
pr = profiling.tracing.Profile() pr.enable() # ... do something ... pr.disable() s = io.StringIO() sortby = SortKey.CUMULATIVE ps = pstats.Stats(pr, stream=s).sort_stats(sortby) ps.print_stats() print(s.getvalue()) The :class:`Profile` class can also be used as a context manager (supported only in :mod:`profiling.trac...
pr = profiling.tracing.Profile() pr.enable() # ... do something ... pr.disable() s = io.StringIO() sortby = SortKey.CUMULATIVE ps = pstats.Stats(pr, stream=s).sort_stats(sortby) ps.print_stats() print(s.getvalue()) The :class:`Profile` class can also be used as a context manager (supported only in :mod:`profiling.trac...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b6c5263f-790e-4eb0-819b-a882ad9fba60
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,132
supabase-export-v2
2b0c7cd39954dfcd
The :mod:`!profile` module differs from :mod:`profiling.tracing` in several ways: **Higher overhead.** The pure Python implementation is significantly slower than the C implementation, making it unsuitable for profiling long-running programs or performance-sensitive code.
trusted_official_docs
CPython Docs
The :mod:`!profile` module differs from :mod:`profiling.tracing` in several ways: **Higher overhead.** The pure Python implementation is significantly slower than the C implementation, making it unsuitable for profiling long-running programs or performance-sensitive code.
The :mod:`!profile` module differs from :mod:`profiling.tracing` in several ways: **Higher overhead.** The pure Python implementation is significantly slower than the C implementation, making it unsuitable for profiling long-running programs or performance-sensitive code.
python, official-docs, cpython, P0
Local_Trusted_Corpus
bbdca170-ffca-4aa8-bd48-bc3dccf65ad0
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,102
supabase-export-v2
e5ebd33cf0890ac8
This class is normally only used if more precise control over profiling is needed than what the :func:`profiling.tracing.run` function provides. A custom timer can be supplied for measuring how long code takes to run via the *timer* argument. This must be a function that returns a single number representing the curre...
trusted_official_docs
CPython Docs
This class is normally only used if more precise control over profiling is needed than what the :func:`profiling.tracing.run` function provides. A custom timer can be supplied for measuring how long code takes to run via the *timer* argument. This must be a function that returns a single number representing the curre...
This class is normally only used if more precise control over profiling is needed than what the :func:`profiling.tracing.run` function provides. A custom timer can be supplied for measuring how long code takes to run via the *timer* argument. This must be a function that returns a single number representing the curre...
python, official-docs, cpython, P0
Local_Trusted_Corpus
cc9d14aa-9788-4dbc-a141-691deaeb3933
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,165
supabase-export-v2
2eab8acd447cd2a8
pr = profiling.tracing.Profile(your_integer_time_func, 0.001) As the :class:`profiling.tracing.Profile` class cannot be calibrated, custom timer functions should be used with care and should be as fast as possible. For the best results with a custom timer, it might be necessary to hard-code it in the C source of the ...
trusted_official_docs
CPython Docs
pr = profiling.tracing.Profile(your_integer_time_func, 0.001) As the :class:`profiling.tracing.Profile` class cannot be calibrated, custom timer functions should be used with care and should be as fast as possible. For the best results with a custom timer, it might be necessary to hard-code it in the C source of the ...
pr = profiling.tracing.Profile(your_integer_time_func, 0.001) As the :class:`profiling.tracing.Profile` class cannot be calibrated, custom timer functions should be used with care and should be as fast as possible. For the best results with a custom timer, it might be necessary to hard-code it in the C source of the ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d702c02a-7597-4c94-9ba8-8044c1177693
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,155
supabase-export-v2
c19fb4759ab0096f
# 3. Specify computed bias in instance constructor. pr = profile.Profile(bias=your_computed_bias) If you have a choice, you are better off choosing a smaller constant, and then your results will "less often" show up as negative in profile statistics.
trusted_official_docs
CPython Docs
# 3. Specify computed bias in instance constructor. pr = profile.Profile(bias=your_computed_bias) If you have a choice, you are better off choosing a smaller constant, and then your results will "less often" show up as negative in profile statistics.
# 3. Specify computed bias in instance constructor. pr = profile.Profile(bias=your_computed_bias) If you have a choice, you are better off choosing a smaller constant, and then your results will "less often" show up as negative in profile statistics.
python, official-docs, cpython, P0
Local_Trusted_Corpus
db6b7ef7-061e-436e-9cef-1d6c21d20911
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,129
supabase-export-v2
84a54a3c98426c4e
Profile ``func(*args, **kwargs)`` Note that profiling will only work if the called command/function actually returns. If the interpreter is terminated (e.g. via a :func:`sys.exit` call during the called command/function execution) no profiling results will be printed.
trusted_official_docs
CPython Docs
Profile ``func(*args, **kwargs)`` Note that profiling will only work if the called command/function actually returns. If the interpreter is terminated (e.g. via a :func:`sys.exit` call during the called command/function execution) no profiling results will be printed.
Profile ``func(*args, **kwargs)`` Note that profiling will only work if the called command/function actually returns. If the interpreter is terminated (e.g. via a :func:`sys.exit` call during the called command/function execution) no profiling results will be printed.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e1e79191-f356-4380-9020-c664cc75ac41
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,093
supabase-export-v2
edac9a8c06a68185
.. function:: run(command, filename=None, sort=-1) This function takes a single argument that can be passed to the :func:`exec` function, and an optional file name. In all cases this routine executes::
trusted_official_docs
CPython Docs
.. function:: run(command, filename=None, sort=-1) This function takes a single argument that can be passed to the :func:`exec` function, and an optional file name. In all cases this routine executes::
.. function:: run(command, filename=None, sort=-1) This function takes a single argument that can be passed to the :func:`exec` function, and an optional file name. In all cases this routine executes::
python, official-docs, cpython, P0
Local_Trusted_Corpus
e24f469c-a2bc-48b7-8f01-8cb6228df8ce
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,158
supabase-export-v2
46af3771b60b3a4e
Using a custom timer ==================== If you want to change how current time is determined (for example, to force use of wall-clock time or elapsed process time), pass the timing function you want to the :class:`Profile` class constructor::
trusted_official_docs
CPython Docs
Using a custom timer ==================== If you want to change how current time is determined (for example, to force use of wall-clock time or elapsed process time), pass the timing function you want to the :class:`Profile` class constructor::
Using a custom timer ==================== If you want to change how current time is determined (for example, to force use of wall-clock time or elapsed process time), pass the timing function you want to the :class:`Profile` class constructor::
python, official-docs, cpython, P0
Local_Trusted_Corpus
e5c61db2-d7e5-4a3e-b44a-8e6eb3afbfb5
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,139
supabase-export-v2
aed4b378a3b7afee
technique traditionally involves less overhead (as the code does not need to be instrumented), but provides only relative indications of where time is being spent. In Python, since there is an interpreter active during execution, the presence of instrumented code is not required in order to do deterministic profiling. ...
trusted_official_docs
CPython Docs
technique traditionally involves less overhead (as the code does not need to be instrumented), but provides only relative indications of where time is being spent. In Python, since there is an interpreter active during execution, the presence of instrumented code is not required in order to do deterministic profiling. ...
technique traditionally involves less overhead (as the code does not need to be instrumented), but provides only relative indications of where time is being spent. In Python, since there is an interpreter active during execution, the presence of instrumented code is not required in order to do deterministic profiling. ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f45b035a-1c40-4104-8894-af06bc021c27
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,147
supabase-export-v2
215cb328835e85b4
results. By default, the constant is 0. The following procedure can be used to obtain a better constant for a given platform (see :ref:`profile-limitations`). :: import profile pr = profile.Profile() for i in range(5): print(pr.calibrate(10000))
trusted_official_docs
CPython Docs
results. By default, the constant is 0. The following procedure can be used to obtain a better constant for a given platform (see :ref:`profile-limitations`). :: import profile pr = profile.Profile() for i in range(5): print(pr.calibrate(10000))
results. By default, the constant is 0. The following procedure can be used to obtain a better constant for a given platform (see :ref:`profile-limitations`). :: import profile pr = profile.Profile() for i in range(5): print(pr.calibrate(10000))
python, official-docs, cpython, P0
Local_Trusted_Corpus
fabaef56-87d1-45c1-98eb-e1fa6225bf46
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,142
supabase-export-v2
ffda2c7257407f88
Limitations =========== One limitation has to do with accuracy of timing information. There is a fundamental problem with deterministic profilers involving accuracy. The most obvious restriction is that the underlying "clock" is only ticking at a rate (typically) of about .001 seconds. Hence no measurements will be mor...
trusted_official_docs
CPython Docs
Limitations =========== One limitation has to do with accuracy of timing information. There is a fundamental problem with deterministic profilers involving accuracy. The most obvious restriction is that the underlying "clock" is only ticking at a rate (typically) of about .001 seconds. Hence no measurements will be mor...
Limitations =========== One limitation has to do with accuracy of timing information. There is a fundamental problem with deterministic profilers involving accuracy. The most obvious restriction is that the underlying "clock" is only ticking at a rate (typically) of about .001 seconds. Hence no measurements will be mor...
python, official-docs, cpython, P0
Local_Trusted_Corpus
fdf265db-281c-4ec2-b4fc-6a2dfbc901b4
CPython Docs
file://datasets/cpython/Doc/library/profile.rst
unknown
dffb18e7-729f-434d-b513-0427f52cd13c
37,120
supabase-export-v2
8fe4b5a775fd107e
specifies the sorting order of the displayed statistics. It accepts a single key or a tuple of keys to enable multi-level sorting, as in :meth:`pstats.Stats.sort_stats`. .. versionadded:: 3.13 :meth:`~Profile.print_stats` now accepts a tuple of keys.
trusted_official_docs
CPython Docs
specifies the sorting order of the displayed statistics. It accepts a single key or a tuple of keys to enable multi-level sorting, as in :meth:`pstats.Stats.sort_stats`. .. versionadded:: 3.13 :meth:`~Profile.print_stats` now accepts a tuple of keys.
specifies the sorting order of the displayed statistics. It accepts a single key or a tuple of keys to enable multi-level sorting, as in :meth:`pstats.Stats.sort_stats`. .. versionadded:: 3.13 :meth:`~Profile.print_stats` now accepts a tuple of keys.
python, official-docs, cpython, P0
Local_Trusted_Corpus
2f0c0b2a-ab01-491f-ab1a-5813930ef467
CPython Docs
file://datasets/cpython/Doc/library/termios.rst
unknown
e8e5d342-2b06-49a5-a63d-6b1c43d563d7
37,181
supabase-export-v2
b65da968c2fe6950
.. function:: tcgetattr(fd) Return a list containing the tty attributes for file descriptor *fd*, as follows: ``[iflag, oflag, cflag, lflag, ispeed, ospeed, cc]`` where *cc* is a list of the tty special characters (each a string of length 1, except the items with indices :const:`VMIN` and :const:`VTIME`, which are i...
trusted_official_docs
CPython Docs
.. function:: tcgetattr(fd) Return a list containing the tty attributes for file descriptor *fd*, as follows: ``[iflag, oflag, cflag, lflag, ispeed, ospeed, cc]`` where *cc* is a list of the tty special characters (each a string of length 1, except the items with indices :const:`VMIN` and :const:`VTIME`, which are i...
.. function:: tcgetattr(fd) Return a list containing the tty attributes for file descriptor *fd*, as follows: ``[iflag, oflag, cflag, lflag, ispeed, ospeed, cc]`` where *cc* is a list of the tty special characters (each a string of length 1, except the items with indices :const:`VMIN` and :const:`VTIME`, which are i...
python, official-docs, cpython, P0
Local_Trusted_Corpus
41a6f7cf-c42f-4fb5-bce2-3c9f07919e34
CPython Docs
file://datasets/cpython/Doc/library/termios.rst
unknown
e8e5d342-2b06-49a5-a63d-6b1c43d563d7
37,182
supabase-export-v2
41eb3c55413f7d2f
flags and the speeds as well as the indexing in the *cc* array must be done using the symbolic constants defined in the :mod:`!termios` module. .. function:: tcsetattr(fd, when, attributes)
trusted_official_docs
CPython Docs
flags and the speeds as well as the indexing in the *cc* array must be done using the symbolic constants defined in the :mod:`!termios` module. .. function:: tcsetattr(fd, when, attributes)
flags and the speeds as well as the indexing in the *cc* array must be done using the symbolic constants defined in the :mod:`!termios` module. .. function:: tcsetattr(fd, when, attributes)
python, official-docs, cpython, P0
Local_Trusted_Corpus
48b89934-f9ca-4d59-bbb3-8e2619ba3085
CPython Docs
file://datasets/cpython/Doc/library/termios.rst
unknown
e8e5d342-2b06-49a5-a63d-6b1c43d563d7
37,196
supabase-export-v2
de20f5403824ac72
.. function:: tcflow(fd, action) Suspend or resume input or output on file descriptor *fd*. The *action* argument can be :const:`TCOOFF` to suspend output, :const:`TCOON` to restart output, :const:`TCIOFF` to suspend input, or :const:`TCION` to restart input.
trusted_official_docs
CPython Docs
.. function:: tcflow(fd, action) Suspend or resume input or output on file descriptor *fd*. The *action* argument can be :const:`TCOOFF` to suspend output, :const:`TCOON` to restart output, :const:`TCIOFF` to suspend input, or :const:`TCION` to restart input.
.. function:: tcflow(fd, action) Suspend or resume input or output on file descriptor *fd*. The *action* argument can be :const:`TCOOFF` to suspend output, :const:`TCOON` to restart output, :const:`TCIOFF` to suspend input, or :const:`TCION` to restart input.
python, official-docs, cpython, P0
Local_Trusted_Corpus
66ab335d-7091-4345-9f78-1a96fad1889e
CPython Docs
file://datasets/cpython/Doc/library/termios.rst
unknown
e8e5d342-2b06-49a5-a63d-6b1c43d563d7
37,175
supabase-export-v2
90b10ef1e41357a3
-------------- This module provides an interface to the POSIX calls for tty I/O control. For a complete description of these calls, see :manpage:`termios(3)` Unix manual page. It is only available for those Unix versions that support POSIX *termios* style tty I/O control configured during installation.
trusted_official_docs
CPython Docs
-------------- This module provides an interface to the POSIX calls for tty I/O control. For a complete description of these calls, see :manpage:`termios(3)` Unix manual page. It is only available for those Unix versions that support POSIX *termios* style tty I/O control configured during installation.
-------------- This module provides an interface to the POSIX calls for tty I/O control. For a complete description of these calls, see :manpage:`termios(3)` Unix manual page. It is only available for those Unix versions that support POSIX *termios* style tty I/O control configured during installation.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7ad42298-a315-4a9e-a5c8-58a5bf069af9
CPython Docs
file://datasets/cpython/Doc/library/termios.rst
unknown
e8e5d342-2b06-49a5-a63d-6b1c43d563d7
37,206
supabase-export-v2
f09781c8a5e8ccb3
using a separate :func:`tcgetattr` call and a :keyword:`try` ... :keyword:`finally` statement to ensure that the old tty attributes are restored exactly no matter what happens:: def getpass(prompt="Password: "): import termios, sys fd = sys.stdin.fileno() old = termios.tcgetattr(fd) new = termios.tcgetattr(fd) new...
trusted_official_docs
CPython Docs
using a separate :func:`tcgetattr` call and a :keyword:`try` ... :keyword:`finally` statement to ensure that the old tty attributes are restored exactly no matter what happens:: def getpass(prompt="Password: "): import termios, sys fd = sys.stdin.fileno() old = termios.tcgetattr(fd) new = termios.tcgetattr(fd) new...
using a separate :func:`tcgetattr` call and a :keyword:`try` ... :keyword:`finally` statement to ensure that the old tty attributes are restored exactly no matter what happens:: def getpass(prompt="Password: "): import termios, sys fd = sys.stdin.fileno() old = termios.tcgetattr(fd) new = termios.tcgetattr(fd) new...
python, official-docs, cpython, P0
Local_Trusted_Corpus
92f3445d-2081-45e6-b16b-f2e75930aa21
CPython Docs
file://datasets/cpython/Doc/library/termios.rst
unknown
e8e5d342-2b06-49a5-a63d-6b1c43d563d7
37,205
supabase-export-v2
13fbe6009be5056f
Example ------- Here's a function that prompts for a password with echoing turned off. Note the technique using a separate :func:`tcgetattr` call and a :keyword:`try` ... :keyword:`finally` statement to ensure that the old tty attributes are restored exactly no matter what happens::
trusted_official_docs
CPython Docs
Example ------- Here's a function that prompts for a password with echoing turned off. Note the technique using a separate :func:`tcgetattr` call and a :keyword:`try` ... :keyword:`finally` statement to ensure that the old tty attributes are restored exactly no matter what happens::
Example ------- Here's a function that prompts for a password with echoing turned off. Note the technique using a separate :func:`tcgetattr` call and a :keyword:`try` ... :keyword:`finally` statement to ensure that the old tty attributes are restored exactly no matter what happens::
python, official-docs, cpython, P0
Local_Trusted_Corpus
aad51a6b-e231-4ed4-b206-8dcaec80f5cf
CPython Docs
file://datasets/cpython/Doc/library/termios.rst
unknown
e8e5d342-2b06-49a5-a63d-6b1c43d563d7
37,183
supabase-export-v2
f7e20721e2c5d59c
.. function:: tcsetattr(fd, when, attributes) Set the tty attributes for file descriptor *fd* from the *attributes*, which is a list like the one returned by :func:`tcgetattr`. The *when* argument determines when the attributes are changed:
trusted_official_docs
CPython Docs
.. function:: tcsetattr(fd, when, attributes) Set the tty attributes for file descriptor *fd* from the *attributes*, which is a list like the one returned by :func:`tcgetattr`. The *when* argument determines when the attributes are changed:
.. function:: tcsetattr(fd, when, attributes) Set the tty attributes for file descriptor *fd* from the *attributes*, which is a list like the one returned by :func:`tcgetattr`. The *when* argument determines when the attributes are changed:
python, official-docs, cpython, P0
Local_Trusted_Corpus
b89a46a3-6a95-4112-b2e8-b886856e1e74
CPython Docs
file://datasets/cpython/Doc/library/termios.rst
unknown
e8e5d342-2b06-49a5-a63d-6b1c43d563d7
37,179
supabase-export-v2
d03f1bcce0735ddb
these have the same name as their counterparts in C. Please refer to your system documentation for more information on using these terminal control interfaces. The module defines the following functions:
trusted_official_docs
CPython Docs
these have the same name as their counterparts in C. Please refer to your system documentation for more information on using these terminal control interfaces. The module defines the following functions:
these have the same name as their counterparts in C. Please refer to your system documentation for more information on using these terminal control interfaces. The module defines the following functions:
python, official-docs, cpython, P0
Local_Trusted_Corpus
cc011635-f00e-49cb-9158-e785c813fbcd
CPython Docs
file://datasets/cpython/Doc/library/termios.rst
unknown
e8e5d342-2b06-49a5-a63d-6b1c43d563d7
37,177
supabase-export-v2
4087dfec4e67e9c2
.. availability:: Unix. All functions in this module take a file descriptor *fd* as their first argument. This can be an integer file descriptor, such as returned by ``sys.stdin.fileno()``, or a :term:`file object`, such as ``sys.stdin`` itself.
trusted_official_docs
CPython Docs
.. availability:: Unix. All functions in this module take a file descriptor *fd* as their first argument. This can be an integer file descriptor, such as returned by ``sys.stdin.fileno()``, or a :term:`file object`, such as ``sys.stdin`` itself.
.. availability:: Unix. All functions in this module take a file descriptor *fd* as their first argument. This can be an integer file descriptor, such as returned by ``sys.stdin.fileno()``, or a :term:`file object`, such as ``sys.stdin`` itself.
python, official-docs, cpython, P0
Local_Trusted_Corpus