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
2c6f30e8-a690-4b00-9183-282de3a86a33
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,897
supabase-export-v2
837f1e30073b07a2
should consider disallowing them. This will make empty lines split keys every time. In the example above, it would produce two keys, ``key`` and ``this``. * *default_section*, default value: ``configparser.DEFAULTSECT`` (that is: ``"DEFAULT"``)
trusted_official_docs
CPython Docs
should consider disallowing them. This will make empty lines split keys every time. In the example above, it would produce two keys, ``key`` and ``this``. * *default_section*, default value: ``configparser.DEFAULTSECT`` (that is: ``"DEFAULT"``)
should consider disallowing them. This will make empty lines split keys every time. In the example above, it would produce two keys, ``key`` and ``this``. * *default_section*, default value: ``configparser.DEFAULTSECT`` (that is: ``"DEFAULT"``)
python, official-docs, cpython, P0
Local_Trusted_Corpus
2e535b3d-b669-4553-9d13-2f977bca7460
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,005
supabase-export-v2
f07e4b228e0a6241
.. method:: get(section, option, *, raw=False, vars=None[, fallback]) Get an *option* value for the named *section*. If *vars* is provided, it must be a dictionary. The *option* is looked up in *vars* (if provided), *section*, and in *DEFAULTSECT* in that order. If the key is not found and *fallback* is provided, it...
trusted_official_docs
CPython Docs
.. method:: get(section, option, *, raw=False, vars=None[, fallback]) Get an *option* value for the named *section*. If *vars* is provided, it must be a dictionary. The *option* is looked up in *vars* (if provided), *section*, and in *DEFAULTSECT* in that order. If the key is not found and *fallback* is provided, it...
.. method:: get(section, option, *, raw=False, vars=None[, fallback]) Get an *option* value for the named *section*. If *vars* is provided, it must be a dictionary. The *option* is looked up in *vars* (if provided), *section*, and in *DEFAULTSECT* in that order. If the key is not found and *fallback* is provided, it...
python, official-docs, cpython, P0
Local_Trusted_Corpus
30e251ab-6191-4472-bae9-b5eca8128fc0
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,846
supabase-export-v2
642397b5912e63e1
.. versionadded:: 3.2 Mapping protocol access is a generic name for functionality that enables using custom objects as if they were dictionaries. In case of :mod:`!configparser`, the mapping interface implementation is using the ``parser['section']['option']`` notation.
trusted_official_docs
CPython Docs
.. versionadded:: 3.2 Mapping protocol access is a generic name for functionality that enables using custom objects as if they were dictionaries. In case of :mod:`!configparser`, the mapping interface implementation is using the ``parser['section']['option']`` notation.
.. versionadded:: 3.2 Mapping protocol access is a generic name for functionality that enables using custom objects as if they were dictionaries. In case of :mod:`!configparser`, the mapping interface implementation is using the ``parser['section']['option']`` notation.
python, official-docs, cpython, P0
Local_Trusted_Corpus
31aa8e4d-7470-44d2-a80d-750f68300667
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,754
supabase-export-v2
f70f06ac337dc293
-------------- This module provides the :class:`ConfigParser` class which implements a basic configuration language which provides a structure similar to what's found in Microsoft Windows INI files. You can use this to write Python programs which can be customized by end users easily.
trusted_official_docs
CPython Docs
-------------- This module provides the :class:`ConfigParser` class which implements a basic configuration language which provides a structure similar to what's found in Microsoft Windows INI files. You can use this to write Python programs which can be customized by end users easily.
-------------- This module provides the :class:`ConfigParser` class which implements a basic configuration language which provides a structure similar to what's found in Microsoft Windows INI files. You can use this to write Python programs which can be customized by end users easily.
python, official-docs, cpython, P0
Local_Trusted_Corpus
31cd91f0-262c-45d8-8abd-eb1d47cb9d8d
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,812
supabase-export-v2
e3c57c9ab33948ea
are they treated as numbers? : no integers, floats and booleans are held as: strings can use the API to get converted values directly: true [Multiline Values] chorus: I'm a lumberjack, and I'm okay I sleep all night and I work all day
trusted_official_docs
CPython Docs
are they treated as numbers? : no integers, floats and booleans are held as: strings can use the API to get converted values directly: true [Multiline Values] chorus: I'm a lumberjack, and I'm okay I sleep all night and I work all day
are they treated as numbers? : no integers, floats and booleans are held as: strings can use the API to get converted values directly: true [Multiline Values] chorus: I'm a lumberjack, and I'm okay I sleep all night and I work all day
python, official-docs, cpython, P0
Local_Trusted_Corpus
31f718bb-6212-4bef-ba79-f7a022ee0482
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,008
supabase-export-v2
8ea29953f0522482
and *fallback* are keyword only to protect users from trying to use the third argument as the *fallback* fallback (especially when using the mapping protocol). .. method:: getint(section, option, *, raw=False, vars=None[, fallback])
trusted_official_docs
CPython Docs
and *fallback* are keyword only to protect users from trying to use the third argument as the *fallback* fallback (especially when using the mapping protocol). .. method:: getint(section, option, *, raw=False, vars=None[, fallback])
and *fallback* are keyword only to protect users from trying to use the third argument as the *fallback* fallback (especially when using the mapping protocol). .. method:: getint(section, option, *, raw=False, vars=None[, fallback])
python, official-docs, cpython, P0
Local_Trusted_Corpus
32218b62-1a7f-4e1b-8f0e-858d46ff911a
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,798
supabase-export-v2
4b558a3bd21dd73b
>>> topsecret.get('CompressionLevel', '3') '9' One more thing to be aware of is that the parser-level :meth:`~ConfigParser.get` method provides a custom, more complex interface, maintained for backwards compatibility. When using this method, a fallback value can be provided via the ``fallback`` keyword-only argument:
trusted_official_docs
CPython Docs
>>> topsecret.get('CompressionLevel', '3') '9' One more thing to be aware of is that the parser-level :meth:`~ConfigParser.get` method provides a custom, more complex interface, maintained for backwards compatibility. When using this method, a fallback value can be provided via the ``fallback`` keyword-only argument:
>>> topsecret.get('CompressionLevel', '3') '9' One more thing to be aware of is that the parser-level :meth:`~ConfigParser.get` method provides a custom, more complex interface, maintained for backwards compatibility. When using this method, a fallback value can be provided via the ``fallback`` keyword-only argument:
python, official-docs, cpython, P0
Local_Trusted_Corpus
332c4339-da39-4753-ab3f-57513d9d798e
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,911
supabase-export-v2
714052958825fd0c
.. method:: ConfigParser.optionxform(option) :noindex: This method transforms option names on every read, get, or set operation. The default converts the name to lowercase. This also means that when a configuration file gets written, all keys will be lowercase. Override this method if that's unsuitable. For example:
trusted_official_docs
CPython Docs
.. method:: ConfigParser.optionxform(option) :noindex: This method transforms option names on every read, get, or set operation. The default converts the name to lowercase. This also means that when a configuration file gets written, all keys will be lowercase. Override this method if that's unsuitable. For example:
.. method:: ConfigParser.optionxform(option) :noindex: This method transforms option names on every read, get, or set operation. The default converts the name to lowercase. This also means that when a configuration file gets written, all keys will be lowercase. Override this method if that's unsuitable. For example:
python, official-docs, cpython, P0
Local_Trusted_Corpus
35723a34-522d-414b-949e-e61cd8988743
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,938
supabase-export-v2
ac8d7c6fd1021719
# The optional *vars* argument is a dict with members that will take # precedence in interpolation. print(cfg.get('Section1', 'foo', vars={'bar': 'Documentation', 'baz': 'evil'})) # The optional *fallback* argument can be used to provide a fallback value print(cfg.get('Section1', 'foo')) # -> "Python is fun!"
trusted_official_docs
CPython Docs
# The optional *vars* argument is a dict with members that will take # precedence in interpolation. print(cfg.get('Section1', 'foo', vars={'bar': 'Documentation', 'baz': 'evil'})) # The optional *fallback* argument can be used to provide a fallback value print(cfg.get('Section1', 'foo')) # -> "Python is fun!"
# The optional *vars* argument is a dict with members that will take # precedence in interpolation. print(cfg.get('Section1', 'foo', vars={'bar': 'Documentation', 'baz': 'evil'})) # The optional *fallback* argument can be used to provide a fallback value print(cfg.get('Section1', 'foo')) # -> "Python is fun!"
python, official-docs, cpython, P0
Local_Trusted_Corpus
3650c924-76b5-4421-babd-4c839d30f9ac
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,821
supabase-export-v2
864da6e1a49e7ea5
.. doctest:: >>> config = """ ... option = value ... ... [ Section 2 ] ... another = val ... """ >>> unnamed = configparser.ConfigParser(allow_unnamed_section=True) >>> unnamed.read_string(config) >>> unnamed.get(configparser.UNNAMED_SECTION, 'option') 'value'
trusted_official_docs
CPython Docs
.. doctest:: >>> config = """ ... option = value ... ... [ Section 2 ] ... another = val ... """ >>> unnamed = configparser.ConfigParser(allow_unnamed_section=True) >>> unnamed.read_string(config) >>> unnamed.get(configparser.UNNAMED_SECTION, 'option') 'value'
.. doctest:: >>> config = """ ... option = value ... ... [ Section 2 ] ... another = val ... """ >>> unnamed = configparser.ConfigParser(allow_unnamed_section=True) >>> unnamed.read_string(config) >>> unnamed.get(configparser.UNNAMED_SECTION, 'option') 'value'
python, official-docs, cpython, P0
Local_Trusted_Corpus
38359001-c692-4be5-9738-6bc5d4c8f057
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,903
supabase-export-v2
5aa1800d85c2587f
on both the parser object and all section proxies. In other words, it will be possible to write both ``parser_instance.getdecimal('section', 'key', fallback=0)`` and ``parser_instance['section'].getdecimal('key', 0)``. If the converter needs to access the state of the parser, it can be implemented as a method on a con...
trusted_official_docs
CPython Docs
on both the parser object and all section proxies. In other words, it will be possible to write both ``parser_instance.getdecimal('section', 'key', fallback=0)`` and ``parser_instance['section'].getdecimal('key', 0)``. If the converter needs to access the state of the parser, it can be implemented as a method on a con...
on both the parser object and all section proxies. In other words, it will be possible to write both ``parser_instance.getdecimal('section', 'key', fallback=0)`` and ``parser_instance['section'].getdecimal('key', 0)``. If the converter needs to access the state of the parser, it can be implemented as a method on a con...
python, official-docs, cpython, P0
Local_Trusted_Corpus
38ed3097-bec9-42af-b81d-4e64178b0351
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,805
supabase-export-v2
cd68dddccbb70862
Supported INI File Structure ---------------------------- A configuration file consists of sections, each led by a ``[section]`` header, followed by key/value entries separated by a specific string (``=`` or ``:`` by default [1]_). By default, section names are case sensitive but keys are not [1]_. Leading and trailing...
trusted_official_docs
CPython Docs
Supported INI File Structure ---------------------------- A configuration file consists of sections, each led by a ``[section]`` header, followed by key/value entries separated by a specific string (``=`` or ``:`` by default [1]_). By default, section names are case sensitive but keys are not [1]_. Leading and trailing...
Supported INI File Structure ---------------------------- A configuration file consists of sections, each led by a ``[section]`` header, followed by key/value entries separated by a specific string (``=`` or ``:`` by default [1]_). By default, section names are case sensitive but keys are not [1]_. Leading and trailing...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3c2a284a-c0d6-4926-9430-aae714bf7b43
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,832
supabase-export-v2
257a5ad8d8b6ea3c
With ``interpolation`` set to ``None``, the parser would simply return ``%(my_dir)s/Pictures`` as the value of ``my_pictures`` and ``%(home_dir)s/lumberjack`` as the value of ``my_dir``. .. index:: single: $ (dollar); interpolation in configuration files
trusted_official_docs
CPython Docs
With ``interpolation`` set to ``None``, the parser would simply return ``%(my_dir)s/Pictures`` as the value of ``my_pictures`` and ``%(home_dir)s/lumberjack`` as the value of ``my_dir``. .. index:: single: $ (dollar); interpolation in configuration files
With ``interpolation`` set to ``None``, the parser would simply return ``%(my_dir)s/Pictures`` as the value of ``my_pictures`` and ``%(home_dir)s/lumberjack`` as the value of ``my_dir``. .. index:: single: $ (dollar); interpolation in configuration files
python, official-docs, cpython, P0
Local_Trusted_Corpus
3c2c1985-8efd-46d9-9d48-73a02d631248
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,010
supabase-export-v2
10ff9884591d0821
A convenience method which coerces the *option* in the specified *section* to an integer. See :meth:`get` for explanation of *raw*, *vars* and *fallback*. .. method:: getfloat(section, option, *, raw=False, vars=None[, fallback])
trusted_official_docs
CPython Docs
A convenience method which coerces the *option* in the specified *section* to an integer. See :meth:`get` for explanation of *raw*, *vars* and *fallback*. .. method:: getfloat(section, option, *, raw=False, vars=None[, fallback])
A convenience method which coerces the *option* in the specified *section* to an integer. See :meth:`get` for explanation of *raw*, *vars* and *fallback*. .. method:: getfloat(section, option, *, raw=False, vars=None[, fallback])
python, official-docs, cpython, P0
Local_Trusted_Corpus
3ca7e0a0-b2f8-4d27-bb4f-da8096b3e574
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,848
supabase-export-v2
86676f4401446cdb
parser on demand. What's even more important is that when values are changed on a section proxy, they are actually mutated in the original parser. :mod:`!configparser` objects behave as close to actual dictionaries as possible. The mapping interface is complete and adheres to the :class:`~collections.abc.MutableMapping...
trusted_official_docs
CPython Docs
parser on demand. What's even more important is that when values are changed on a section proxy, they are actually mutated in the original parser. :mod:`!configparser` objects behave as close to actual dictionaries as possible. The mapping interface is complete and adheres to the :class:`~collections.abc.MutableMapping...
parser on demand. What's even more important is that when values are changed on a section proxy, they are actually mutated in the original parser. :mod:`!configparser` objects behave as close to actual dictionaries as possible. The mapping interface is complete and adheres to the :class:`~collections.abc.MutableMapping...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3cd94aa6-535f-40ec-9742-6268b36306ff
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,860
supabase-export-v2
bf59ffe5322427dd
Customizing Parser Behaviour ---------------------------- There are nearly as many INI format variants as there are applications using it. :mod:`!configparser` goes a long way to provide support for the largest sensible set of INI styles available. The default functionality is mainly dictated by historical background a...
trusted_official_docs
CPython Docs
Customizing Parser Behaviour ---------------------------- There are nearly as many INI format variants as there are applications using it. :mod:`!configparser` goes a long way to provide support for the largest sensible set of INI styles available. The default functionality is mainly dictated by historical background a...
Customizing Parser Behaviour ---------------------------- There are nearly as many INI format variants as there are applications using it. :mod:`!configparser` goes a long way to provide support for the largest sensible set of INI styles available. The default functionality is mainly dictated by historical background a...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3e3979ac-bd28-437a-a0f8-ff4feee55fe1
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,856
supabase-export-v2
a4b519239845bf39
* ``parser.popitem()`` never returns it. * ``parser.get(section, option, **kwargs)`` - the second argument is **not** a fallback value. Note however that the section-level ``get()`` methods are compatible both with the mapping protocol and the classic configparser API.
trusted_official_docs
CPython Docs
* ``parser.popitem()`` never returns it. * ``parser.get(section, option, **kwargs)`` - the second argument is **not** a fallback value. Note however that the section-level ``get()`` methods are compatible both with the mapping protocol and the classic configparser API.
* ``parser.popitem()`` never returns it. * ``parser.get(section, option, **kwargs)`` - the second argument is **not** a fallback value. Note however that the section-level ``get()`` methods are compatible both with the mapping protocol and the classic configparser API.
python, official-docs, cpython, P0
Local_Trusted_Corpus
3e41f167-eb4a-450c-9b32-696d9c0b516a
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,863
supabase-export-v2
a836213ad9cb56cd
* *defaults*, default value: ``None`` This option accepts a dictionary of key-value pairs which will be initially put in the ``DEFAULT`` section. This makes for an elegant way to support concise configuration files that don't specify values which are the same as the documented default.
trusted_official_docs
CPython Docs
* *defaults*, default value: ``None`` This option accepts a dictionary of key-value pairs which will be initially put in the ``DEFAULT`` section. This makes for an elegant way to support concise configuration files that don't specify values which are the same as the documented default.
* *defaults*, default value: ``None`` This option accepts a dictionary of key-value pairs which will be initially put in the ``DEFAULT`` section. This makes for an elegant way to support concise configuration files that don't specify values which are the same as the documented default.
python, official-docs, cpython, P0
Local_Trusted_Corpus
44f6bfbe-b8d2-4ec8-b664-564b26f016ad
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,936
supabase-export-v2
45d279ad08ff887b
cfg = configparser.ConfigParser() cfg.read('example.cfg') # Set the optional *raw* argument of get() to True if you wish to disable # interpolation in a single get operation. print(cfg.get('Section1', 'foo', raw=False)) # -> "Python is fun!" print(cfg.get('Section1', 'foo', raw=True)) # -> "%(bar)s is %(baz)s!"
trusted_official_docs
CPython Docs
cfg = configparser.ConfigParser() cfg.read('example.cfg') # Set the optional *raw* argument of get() to True if you wish to disable # interpolation in a single get operation. print(cfg.get('Section1', 'foo', raw=False)) # -> "Python is fun!" print(cfg.get('Section1', 'foo', raw=True)) # -> "%(bar)s is %(baz)s!"
cfg = configparser.ConfigParser() cfg.read('example.cfg') # Set the optional *raw* argument of get() to True if you wish to disable # interpolation in a single get operation. print(cfg.get('Section1', 'foo', raw=False)) # -> "Python is fun!" print(cfg.get('Section1', 'foo', raw=True)) # -> "%(bar)s is %(baz)s!"
python, official-docs, cpython, P0
Local_Trusted_Corpus
493e8db1-ac8a-43db-be13-9f417810ca33
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,815
supabase-export-v2
1b1dce9cea526f29
[You can use comments] # like this ; or this # By default only in an empty line. # Inline comments can be harmful because they prevent users # from using the delimiting characters as parts of values. # That being said, this can be customized.
trusted_official_docs
CPython Docs
[You can use comments] # like this ; or this # By default only in an empty line. # Inline comments can be harmful because they prevent users # from using the delimiting characters as parts of values. # That being said, this can be customized.
[You can use comments] # like this ; or this # By default only in an empty line. # Inline comments can be harmful because they prevent users # from using the delimiting characters as parts of values. # That being said, this can be customized.
python, official-docs, cpython, P0
Local_Trusted_Corpus
49c4f93f-b9bb-4922-9d9d-ee348364878f
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,778
supabase-export-v2
2d48abd5f87025cb
the ``DEFAULT`` section which provides default values for all other sections [1]_. Note also that keys in sections are case-insensitive and stored in lowercase [1]_. It is possible to read several configurations into a single :class:`ConfigParser`, where the most recently added configuration has the highest priority. A...
trusted_official_docs
CPython Docs
the ``DEFAULT`` section which provides default values for all other sections [1]_. Note also that keys in sections are case-insensitive and stored in lowercase [1]_. It is possible to read several configurations into a single :class:`ConfigParser`, where the most recently added configuration has the highest priority. A...
the ``DEFAULT`` section which provides default values for all other sections [1]_. Note also that keys in sections are case-insensitive and stored in lowercase [1]_. It is possible to read several configurations into a single :class:`ConfigParser`, where the most recently added configuration has the highest priority. A...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4b17c247-574a-42c6-9350-602147c106d7
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,939
supabase-export-v2
a6d3b3bf2520e577
# The optional *fallback* argument can be used to provide a fallback value print(cfg.get('Section1', 'foo')) # -> "Python is fun!" print(cfg.get('Section1', 'foo', fallback='Monty is not.')) # -> "Python is fun!"
trusted_official_docs
CPython Docs
# The optional *fallback* argument can be used to provide a fallback value print(cfg.get('Section1', 'foo')) # -> "Python is fun!" print(cfg.get('Section1', 'foo', fallback='Monty is not.')) # -> "Python is fun!"
# The optional *fallback* argument can be used to provide a fallback value print(cfg.get('Section1', 'foo')) # -> "Python is fun!" print(cfg.get('Section1', 'foo', fallback='Monty is not.')) # -> "Python is fun!"
python, official-docs, cpython, P0
Local_Trusted_Corpus
4e73fbdc-f95d-47d8-8243-21bd87e9d80a
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,864
supabase-export-v2
1c452ba4d0d0a3a4
``DEFAULT`` section. This makes for an elegant way to support concise configuration files that don't specify values which are the same as the documented default. Hint: if you want to specify default values for a specific section, use :meth:`~ConfigParser.read_dict` before you read the actual file.
trusted_official_docs
CPython Docs
``DEFAULT`` section. This makes for an elegant way to support concise configuration files that don't specify values which are the same as the documented default. Hint: if you want to specify default values for a specific section, use :meth:`~ConfigParser.read_dict` before you read the actual file.
``DEFAULT`` section. This makes for an elegant way to support concise configuration files that don't specify values which are the same as the documented default. Hint: if you want to specify default values for a specific section, use :meth:`~ConfigParser.read_dict` before you read the actual file.
python, official-docs, cpython, P0
Local_Trusted_Corpus
4ffcc7bd-371f-4a31-8ca4-f4d9008f306a
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,951
supabase-export-v2
4a6be16e80354c01
it will be used to create the dictionary objects for the list of sections, for the options within a section, and for the default values. When *delimiters* is given, it is used as the set of substrings that divide keys from values. When *comment_prefixes* is given, it will be used as the set of substrings that prefix ...
trusted_official_docs
CPython Docs
it will be used to create the dictionary objects for the list of sections, for the options within a section, and for the default values. When *delimiters* is given, it is used as the set of substrings that divide keys from values. When *comment_prefixes* is given, it will be used as the set of substrings that prefix ...
it will be used to create the dictionary objects for the list of sections, for the options within a section, and for the default values. When *delimiters* is given, it is used as the set of substrings that divide keys from values. When *comment_prefixes* is given, it will be used as the set of substrings that prefix ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
516fbc52-7c2f-46b1-86df-1254d0a90c91
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,849
supabase-export-v2
dec362723ff0b911
as possible. The mapping interface is complete and adheres to the :class:`~collections.abc.MutableMapping` ABC. However, there are a few differences that should be taken into account: * By default, all keys in sections are accessible in a case-insensitive manner [1]_. E.g. ``for option in parser["section"]`` yields on...
trusted_official_docs
CPython Docs
as possible. The mapping interface is complete and adheres to the :class:`~collections.abc.MutableMapping` ABC. However, there are a few differences that should be taken into account: * By default, all keys in sections are accessible in a case-insensitive manner [1]_. E.g. ``for option in parser["section"]`` yields on...
as possible. The mapping interface is complete and adheres to the :class:`~collections.abc.MutableMapping` ABC. However, there are a few differences that should be taken into account: * By default, all keys in sections are accessible in a case-insensitive manner [1]_. E.g. ``for option in parser["section"]`` yields on...
python, official-docs, cpython, P0
Local_Trusted_Corpus
51f360d3-271e-49cb-ab87-c2b2269867c1
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,824
supabase-export-v2
ed2a4951e128a278
On top of the core functionality, :class:`ConfigParser` supports interpolation. This means values can be preprocessed before returning them from ``get()`` calls. .. index:: single: % (percent); interpolation in configuration files
trusted_official_docs
CPython Docs
On top of the core functionality, :class:`ConfigParser` supports interpolation. This means values can be preprocessed before returning them from ``get()`` calls. .. index:: single: % (percent); interpolation in configuration files
On top of the core functionality, :class:`ConfigParser` supports interpolation. This means values can be preprocessed before returning them from ``get()`` calls. .. index:: single: % (percent); interpolation in configuration files
python, official-docs, cpython, P0
Local_Trusted_Corpus
52f2c54c-33e6-4124-bbef-e10242bfbc50
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,782
supabase-export-v2
df8334d52a74f128
= {'ServerAliveInterval': '-1'} >>> with open('override.ini', 'w') as configfile: ... config_override.write(configfile) ... >>> config_override = configparser.ConfigParser() >>> config_override.read(['example.ini', 'override.ini']) ['example.ini', 'override.ini'] >>> print(config_override.get('DEFAULT', 'ServerAliveInt...
trusted_official_docs
CPython Docs
= {'ServerAliveInterval': '-1'} >>> with open('override.ini', 'w') as configfile: ... config_override.write(configfile) ... >>> config_override = configparser.ConfigParser() >>> config_override.read(['example.ini', 'override.ini']) ['example.ini', 'override.ini'] >>> print(config_override.get('DEFAULT', 'ServerAliveInt...
= {'ServerAliveInterval': '-1'} >>> with open('override.ini', 'w') as configfile: ... config_override.write(configfile) ... >>> config_override = configparser.ConfigParser() >>> config_override.read(['example.ini', 'override.ini']) ['example.ini', 'override.ini'] >>> print(config_override.get('DEFAULT', 'ServerAliveInt...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5409892a-d2bb-43ef-b853-35a3457957f1
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,078
supabase-export-v2
75ef5c287fdc8110
Exception raised when errors occur attempting to parse a file. .. versionchanged:: 3.12 The ``filename`` attribute and :meth:`!__init__` constructor argument were removed. They have been available using the name ``source`` since 3.2.
trusted_official_docs
CPython Docs
Exception raised when errors occur attempting to parse a file. .. versionchanged:: 3.12 The ``filename`` attribute and :meth:`!__init__` constructor argument were removed. They have been available using the name ``source`` since 3.2.
Exception raised when errors occur attempting to parse a file. .. versionchanged:: 3.12 The ``filename`` attribute and :meth:`!__init__` constructor argument were removed. They have been available using the name ``source`` since 3.2.
python, official-docs, cpython, P0
Local_Trusted_Corpus
55469e21-c083-4f48-a83a-96e8722c6c46
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,011
supabase-export-v2
211c3e5aedbad361
.. method:: getfloat(section, option, *, raw=False, vars=None[, fallback]) A convenience method which coerces the *option* in the specified *section* to a floating-point number. See :meth:`get` for explanation of *raw*, *vars* and *fallback*.
trusted_official_docs
CPython Docs
.. method:: getfloat(section, option, *, raw=False, vars=None[, fallback]) A convenience method which coerces the *option* in the specified *section* to a floating-point number. See :meth:`get` for explanation of *raw*, *vars* and *fallback*.
.. method:: getfloat(section, option, *, raw=False, vars=None[, fallback]) A convenience method which coerces the *option* in the specified *section* to a floating-point number. See :meth:`get` for explanation of *raw*, *vars* and *fallback*.
python, official-docs, cpython, P0
Local_Trusted_Corpus
57726ae9-eb25-45d6-9a47-0e13b7bb7b48
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,000
supabase-export-v2
1ba18db57bce3f68
.. method:: read_dict(dictionary, source='<dict>') Load configuration from any object that provides a dict-like ``items()`` method. Keys are section names, values are dictionaries with keys and values that should be present in the section. If the used dictionary type preserves order, sections and their keys will be ...
trusted_official_docs
CPython Docs
.. method:: read_dict(dictionary, source='<dict>') Load configuration from any object that provides a dict-like ``items()`` method. Keys are section names, values are dictionaries with keys and values that should be present in the section. If the used dictionary type preserves order, sections and their keys will be ...
.. method:: read_dict(dictionary, source='<dict>') Load configuration from any object that provides a dict-like ``items()`` method. Keys are section names, values are dictionaries with keys and values that should be present in the section. If the used dictionary type preserves order, sections and their keys will be ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
59f26a18-8939-44d7-ae8e-da119f79697e
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,884
supabase-export-v2
c206d025dcd8e5db
names, options and empty lines as well). By default inline comments are disabled and ``'#'`` and ``';'`` are used as prefixes for whole line comments. .. versionchanged:: 3.2 In previous versions of :mod:`!configparser` behaviour matched ``comment_prefixes=('#',';')`` and ``inline_comment_prefixes=(';',)``.
trusted_official_docs
CPython Docs
names, options and empty lines as well). By default inline comments are disabled and ``'#'`` and ``';'`` are used as prefixes for whole line comments. .. versionchanged:: 3.2 In previous versions of :mod:`!configparser` behaviour matched ``comment_prefixes=('#',';')`` and ``inline_comment_prefixes=(';',)``.
names, options and empty lines as well). By default inline comments are disabled and ``'#'`` and ``';'`` are used as prefixes for whole line comments. .. versionchanged:: 3.2 In previous versions of :mod:`!configparser` behaviour matched ``comment_prefixes=('#',';')`` and ``inline_comment_prefixes=(';',)``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
5dc512a7-39c0-466a-b761-f022ddaceb5d
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,896
supabase-export-v2
38a868fb63f89b1a
this = is still a part of the multiline value of 'key' This can be especially problematic for the user to see if she's using a proportional font to edit the file. That is why when your application does not need values with empty lines, you should consider disallowing them. This will make empty lines split keys every...
trusted_official_docs
CPython Docs
this = is still a part of the multiline value of 'key' This can be especially problematic for the user to see if she's using a proportional font to edit the file. That is why when your application does not need values with empty lines, you should consider disallowing them. This will make empty lines split keys every...
this = is still a part of the multiline value of 'key' This can be especially problematic for the user to see if she's using a proportional font to edit the file. That is why when your application does not need values with empty lines, you should consider disallowing them. This will make empty lines split keys every...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5eb0b5ae-f84e-4616-a44d-b830b51e923b
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,031
supabase-export-v2
a39391d243635db5
a lower-case version of *option*; subclasses may override this or client code can set an attribute of this name on instances to affect this behavior. You don't need to subclass the parser to use this method, you can also set it on an instance, to a function that takes a string argument and returns a string. Setting i...
trusted_official_docs
CPython Docs
a lower-case version of *option*; subclasses may override this or client code can set an attribute of this name on instances to affect this behavior. You don't need to subclass the parser to use this method, you can also set it on an instance, to a function that takes a string argument and returns a string. Setting i...
a lower-case version of *option*; subclasses may override this or client code can set an attribute of this name on instances to affect this behavior. You don't need to subclass the parser to use this method, you can also set it on an instance, to a function that takes a string argument and returns a string. Setting i...
python, official-docs, cpython, P0
Local_Trusted_Corpus
625cd5b7-8d92-4a9e-95a4-e776e9f35e47
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,806
supabase-export-v2
59e0e2c8efc6ad09
deeper than the first line of the value. Depending on the parser's mode, blank lines may be treated as parts of multiline values or ignored. By default, a valid section name can be any string that does not contain '\\n'. To change this, see :attr:`ConfigParser.SECTCRE`.
trusted_official_docs
CPython Docs
deeper than the first line of the value. Depending on the parser's mode, blank lines may be treated as parts of multiline values or ignored. By default, a valid section name can be any string that does not contain '\\n'. To change this, see :attr:`ConfigParser.SECTCRE`.
deeper than the first line of the value. Depending on the parser's mode, blank lines may be treated as parts of multiline values or ignored. By default, a valid section name can be any string that does not contain '\\n'. To change this, see :attr:`ConfigParser.SECTCRE`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
6409092a-c454-4678-a7d2-c3e133caa84f
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,831
supabase-export-v2
30c9a54a024f577b
done on demand so keys used in the chain of references do not have to be specified in any specific order in the configuration file. With ``interpolation`` set to ``None``, the parser would simply return ``%(my_dir)s/Pictures`` as the value of ``my_pictures`` and ``%(home_dir)s/lumberjack`` as the value of ``my_dir``.
trusted_official_docs
CPython Docs
done on demand so keys used in the chain of references do not have to be specified in any specific order in the configuration file. With ``interpolation`` set to ``None``, the parser would simply return ``%(my_dir)s/Pictures`` as the value of ``my_pictures`` and ``%(home_dir)s/lumberjack`` as the value of ``my_dir``.
done on demand so keys used in the chain of references do not have to be specified in any specific order in the configuration file. With ``interpolation`` set to ``None``, the parser would simply return ``%(my_dir)s/Pictures`` as the value of ``my_pictures`` and ``%(home_dir)s/lumberjack`` as the value of ``my_dir``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
643a3d73-cffc-4e58-9a34-52362e1460d9
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,914
supabase-export-v2
81611642e57682b5
typical.read_string(config) >>> list(typical['Section1'].keys()) ['key'] >>> list(typical['Section2'].keys()) ['anotherkey'] >>> custom = configparser.RawConfigParser() >>> custom.optionxform = lambda option: option >>> custom.read_string(config) >>> list(custom['Section1'].keys()) ['Key'] >>> list(custom['Section2'].k...
trusted_official_docs
CPython Docs
typical.read_string(config) >>> list(typical['Section1'].keys()) ['key'] >>> list(typical['Section2'].keys()) ['anotherkey'] >>> custom = configparser.RawConfigParser() >>> custom.optionxform = lambda option: option >>> custom.read_string(config) >>> list(custom['Section1'].keys()) ['Key'] >>> list(custom['Section2'].k...
typical.read_string(config) >>> list(typical['Section1'].keys()) ['key'] >>> list(typical['Section2'].keys()) ['anotherkey'] >>> custom = configparser.RawConfigParser() >>> custom.optionxform = lambda option: option >>> custom.read_string(config) >>> list(custom['Section1'].keys()) ['Key'] >>> list(custom['Section2'].k...
python, official-docs, cpython, P0
Local_Trusted_Corpus
64cceb51-e65a-4b0a-a35d-49805da94f05
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,787
supabase-export-v2
cecf32a708d6362e
>>> int(topsecret['Port']) 50022 >>> float(topsecret['CompressionLevel']) 9.0 Since this task is so common, config parsers provide a range of handy getter methods to handle integers, floats and booleans. The last one is the most interesting because simply passing the value to ``bool()`` would do no good since ``bool('F...
trusted_official_docs
CPython Docs
>>> int(topsecret['Port']) 50022 >>> float(topsecret['CompressionLevel']) 9.0 Since this task is so common, config parsers provide a range of handy getter methods to handle integers, floats and booleans. The last one is the most interesting because simply passing the value to ``bool()`` would do no good since ``bool('F...
>>> int(topsecret['Port']) 50022 >>> float(topsecret['CompressionLevel']) 9.0 Since this task is so common, config parsers provide a range of handy getter methods to handle integers, floats and booleans. The last one is the most interesting because simply passing the value to ``bool()`` would do no good since ``bool('F...
python, official-docs, cpython, P0
Local_Trusted_Corpus
68c96f2e-dba9-46bd-bf84-c932d8869bb4
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,889
supabase-export-v2
fde5cc125c1d4f5e
* *strict*, default value: ``True`` When set to ``True``, the parser will not allow for any section or option duplicates while reading from a single source (using :meth:`~ConfigParser.read_file`, :meth:`~ConfigParser.read_string` or :meth:`~ConfigParser.read_dict`). It is recommended to use strict parsers in new app...
trusted_official_docs
CPython Docs
* *strict*, default value: ``True`` When set to ``True``, the parser will not allow for any section or option duplicates while reading from a single source (using :meth:`~ConfigParser.read_file`, :meth:`~ConfigParser.read_string` or :meth:`~ConfigParser.read_dict`). It is recommended to use strict parsers in new app...
* *strict*, default value: ``True`` When set to ``True``, the parser will not allow for any section or option duplicates while reading from a single source (using :meth:`~ConfigParser.read_file`, :meth:`~ConfigParser.read_string` or :meth:`~ConfigParser.read_dict`). It is recommended to use strict parsers in new app...
python, official-docs, cpython, P0
Local_Trusted_Corpus
69312163-ef69-452d-9a37-5efc9008e2df
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,916
supabase-export-v2
32c558061eca0217
.. attribute:: ConfigParser.SECTCRE A compiled regular expression used to parse section headers. The default matches ``[section]`` to the name ``"section"``. Whitespace is considered part of the section name, thus ``[ larch ]`` will be read as a section of name ``" larch "``. Override this attribute if that's unsuit...
trusted_official_docs
CPython Docs
.. attribute:: ConfigParser.SECTCRE A compiled regular expression used to parse section headers. The default matches ``[section]`` to the name ``"section"``. Whitespace is considered part of the section name, thus ``[ larch ]`` will be read as a section of name ``" larch "``. Override this attribute if that's unsuit...
.. attribute:: ConfigParser.SECTCRE A compiled regular expression used to parse section headers. The default matches ``[section]`` to the name ``"section"``. Whitespace is considered part of the section name, thus ``[ larch ]`` will be read as a section of name ``" larch "``. Override this attribute if that's unsuit...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6a26e532-79ed-4647-9bdd-6b3a23b91fa9
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,874
supabase-export-v2
4a6a07b0b731f91e
>>> import configparser >>> sample_config = """ ... [mysqld] ... user = mysql ... pid-file = /var/run/mysqld/mysqld.pid ... skip-external-locking ... old_passwords = 1 ... skip-bdb ... # we don't need ACID today ... skip-innodb ... """ >>> config = configparser.ConfigParser(allow_no_value=True) >>> config.re...
trusted_official_docs
CPython Docs
>>> import configparser >>> sample_config = """ ... [mysqld] ... user = mysql ... pid-file = /var/run/mysqld/mysqld.pid ... skip-external-locking ... old_passwords = 1 ... skip-bdb ... # we don't need ACID today ... skip-innodb ... """ >>> config = configparser.ConfigParser(allow_no_value=True) >>> config.re...
>>> import configparser >>> sample_config = """ ... [mysqld] ... user = mysql ... pid-file = /var/run/mysqld/mysqld.pid ... skip-external-locking ... old_passwords = 1 ... skip-bdb ... # we don't need ACID today ... skip-innodb ... """ >>> config = configparser.ConfigParser(allow_no_value=True) >>> config.re...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6a42f66a-e02d-4b4f-80c8-38aa1706ecee
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,061
supabase-export-v2
755152ea80f8fb77
section that is already present or in strict parsers when a section if found more than once in a single input file, string or dictionary. .. versionchanged:: 3.2 Added the optional *source* and *lineno* attributes and parameters to :meth:`!__init__`.
trusted_official_docs
CPython Docs
section that is already present or in strict parsers when a section if found more than once in a single input file, string or dictionary. .. versionchanged:: 3.2 Added the optional *source* and *lineno* attributes and parameters to :meth:`!__init__`.
section that is already present or in strict parsers when a section if found more than once in a single input file, string or dictionary. .. versionchanged:: 3.2 Added the optional *source* and *lineno* attributes and parameters to :meth:`!__init__`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
6e938a48-7e1d-4046-bb48-02df893816c3
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,965
supabase-export-v2
5717234a866f0ed5
.. versionchanged:: 3.5 The *converters* argument was added. .. versionchanged:: 3.7 The *defaults* argument is read with :meth:`read_dict`, providing consistent behavior across the parser: non-string keys and values are implicitly converted to strings.
trusted_official_docs
CPython Docs
.. versionchanged:: 3.5 The *converters* argument was added. .. versionchanged:: 3.7 The *defaults* argument is read with :meth:`read_dict`, providing consistent behavior across the parser: non-string keys and values are implicitly converted to strings.
.. versionchanged:: 3.5 The *converters* argument was added. .. versionchanged:: 3.7 The *defaults* argument is read with :meth:`read_dict`, providing consistent behavior across the parser: non-string keys and values are implicitly converted to strings.
python, official-docs, cpython, P0
Local_Trusted_Corpus
71372408-b469-427e-99e8-07eea8e5b527
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,901
supabase-export-v2
f41d593607bde29f
provides a more advanced variant inspired by ``zc.buildout``. More on the subject in the `dedicated documentation section <#interpolation-of-values>`_. :class:`RawConfigParser` has a default value of ``None``. * *converters*, default value: not set
trusted_official_docs
CPython Docs
provides a more advanced variant inspired by ``zc.buildout``. More on the subject in the `dedicated documentation section <#interpolation-of-values>`_. :class:`RawConfigParser` has a default value of ``None``. * *converters*, default value: not set
provides a more advanced variant inspired by ``zc.buildout``. More on the subject in the `dedicated documentation section <#interpolation-of-values>`_. :class:`RawConfigParser` has a default value of ``None``. * *converters*, default value: not set
python, official-docs, cpython, P0
Local_Trusted_Corpus
71d4f456-bbe9-4135-8990-c8ff5d5f0136
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,060
supabase-export-v2
82d10ecfbcbd7b7a
.. exception:: DuplicateSectionError Exception raised if :meth:`~ConfigParser.add_section` is called with the name of a section that is already present or in strict parsers when a section if found more than once in a single input file, string or dictionary.
trusted_official_docs
CPython Docs
.. exception:: DuplicateSectionError Exception raised if :meth:`~ConfigParser.add_section` is called with the name of a section that is already present or in strict parsers when a section if found more than once in a single input file, string or dictionary.
.. exception:: DuplicateSectionError Exception raised if :meth:`~ConfigParser.add_section` is called with the name of a section that is already present or in strict parsers when a section if found more than once in a single input file, string or dictionary.
python, official-docs, cpython, P0
Local_Trusted_Corpus
73bc4ebd-1ef4-443f-a1ee-da4e0504dc97
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,850
supabase-export-v2
3f48e7cca9d52d71
option key names. This means lowercased keys by default. At the same time, for a section that holds the key ``'a'``, both expressions return ``True``:: "a" in parser["section"] "A" in parser["section"]
trusted_official_docs
CPython Docs
option key names. This means lowercased keys by default. At the same time, for a section that holds the key ``'a'``, both expressions return ``True``:: "a" in parser["section"] "A" in parser["section"]
option key names. This means lowercased keys by default. At the same time, for a section that holds the key ``'a'``, both expressions return ``True``:: "a" in parser["section"] "A" in parser["section"]
python, official-docs, cpython, P0
Local_Trusted_Corpus
763d9b31-2d31-402f-9473-863f9b2afd4f
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,926
supabase-export-v2
8fc1ad5f6aa92129
config = configparser.RawConfigParser() # Please note that using RawConfigParser's set functions, you can assign # non-string values to keys internally, but will receive an error when # attempting to write to a file or when you get it in non-raw mode. Setting # values using the mapping protocol or ConfigParser's set...
trusted_official_docs
CPython Docs
config = configparser.RawConfigParser() # Please note that using RawConfigParser's set functions, you can assign # non-string values to keys internally, but will receive an error when # attempting to write to a file or when you get it in non-raw mode. Setting # values using the mapping protocol or ConfigParser's set...
config = configparser.RawConfigParser() # Please note that using RawConfigParser's set functions, you can assign # non-string values to keys internally, but will receive an error when # attempting to write to a file or when you get it in non-raw mode. Setting # values using the mapping protocol or ConfigParser's set...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7701e551-43fe-4e27-848a-05bff1dddbb9
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,953
supabase-export-v2
ce72fe7fe6c4bb3e
*allow_no_value* is ``True`` (default: ``False``), options without values are accepted; the value held for these is ``None`` and they are serialized without the trailing delimiter. When *default_section* is given, it specifies the name for the special section holding default values for other sections and interpolation...
trusted_official_docs
CPython Docs
*allow_no_value* is ``True`` (default: ``False``), options without values are accepted; the value held for these is ``None`` and they are serialized without the trailing delimiter. When *default_section* is given, it specifies the name for the special section holding default values for other sections and interpolation...
*allow_no_value* is ``True`` (default: ``False``), options without values are accepted; the value held for these is ``None`` and they are serialized without the trailing delimiter. When *default_section* is given, it specifies the name for the special section holding default values for other sections and interpolation...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7982c556-3d04-45c8-8f2d-d6a0c2ccb641
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,937
supabase-export-v2
871e8fd726a131f5
to disable # interpolation in a single get operation. print(cfg.get('Section1', 'foo', raw=False)) # -> "Python is fun!" print(cfg.get('Section1', 'foo', raw=True)) # -> "%(bar)s is %(baz)s!" # The optional *vars* argument is a dict with members that will take # precedence in interpolation. print(cfg.get('Section1', '...
trusted_official_docs
CPython Docs
to disable # interpolation in a single get operation. print(cfg.get('Section1', 'foo', raw=False)) # -> "Python is fun!" print(cfg.get('Section1', 'foo', raw=True)) # -> "%(bar)s is %(baz)s!" # The optional *vars* argument is a dict with members that will take # precedence in interpolation. print(cfg.get('Section1', '...
to disable # interpolation in a single get operation. print(cfg.get('Section1', 'foo', raw=False)) # -> "Python is fun!" print(cfg.get('Section1', 'foo', raw=True)) # -> "%(bar)s is %(baz)s!" # The optional *vars* argument is a dict with members that will take # precedence in interpolation. print(cfg.get('Section1', '...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7acbc649-50ea-40b4-a368-c44d4ebc1a92
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,866
supabase-export-v2
7579115b4ec7d585
* *dict_type*, default value: :class:`dict` This option has a major impact on how the mapping protocol will behave and how the written configuration files look. With the standard dictionary, every section is stored in the order they were added to the parser. Same goes for options within sections.
trusted_official_docs
CPython Docs
* *dict_type*, default value: :class:`dict` This option has a major impact on how the mapping protocol will behave and how the written configuration files look. With the standard dictionary, every section is stored in the order they were added to the parser. Same goes for options within sections.
* *dict_type*, default value: :class:`dict` This option has a major impact on how the mapping protocol will behave and how the written configuration files look. With the standard dictionary, every section is stored in the order they were added to the parser. Same goes for options within sections.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7c7d0d02-4d50-4527-9fb2-69b462e6df66
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,017
supabase-export-v2
da7619384a51ad58
return a list of *name*, *value* pairs for the options in the given *section*. Optional arguments have the same meaning as for the :meth:`get` method. .. versionchanged:: 3.8 Items present in *vars* no longer appear in the result. The previous behaviour mixed actual parser options with variables provided for interpo...
trusted_official_docs
CPython Docs
return a list of *name*, *value* pairs for the options in the given *section*. Optional arguments have the same meaning as for the :meth:`get` method. .. versionchanged:: 3.8 Items present in *vars* no longer appear in the result. The previous behaviour mixed actual parser options with variables provided for interpo...
return a list of *name*, *value* pairs for the options in the given *section*. Optional arguments have the same meaning as for the :meth:`get` method. .. versionchanged:: 3.8 Items present in *vars* no longer appear in the result. The previous behaviour mixed actual parser options with variables provided for interpo...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7dcef9d1-4a67-4ab7-be19-8a4f3d7eb039
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,087
supabase-export-v2
c80e401ebcc1f931
Exception raised when an attempted :meth:`ConfigParser.write` would not be parsed accurately with a future :meth:`ConfigParser.read` call. Ex: Writing a key beginning with the :attr:`ConfigParser.SECTCRE` pattern would parse as a section header when read. Attempting to write this will raise this exception.
trusted_official_docs
CPython Docs
Exception raised when an attempted :meth:`ConfigParser.write` would not be parsed accurately with a future :meth:`ConfigParser.read` call. Ex: Writing a key beginning with the :attr:`ConfigParser.SECTCRE` pattern would parse as a section header when read. Attempting to write this will raise this exception.
Exception raised when an attempted :meth:`ConfigParser.write` would not be parsed accurately with a future :meth:`ConfigParser.read` call. Ex: Writing a key beginning with the :attr:`ConfigParser.SECTCRE` pattern would parse as a section header when read. Attempting to write this will raise this exception.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7f36c12f-802b-4a9c-a003-a935341cf5c1
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,962
supabase-export-v2
0b9c995ee61c929d
= {'ServerAliveInterval': '-1'} >>> with open('override.ini', 'w') as configfile: ... config_override.write(configfile) ... >>> config_override = configparser.ConfigParser() >>> config_override.read(['example.ini', 'override.ini']) ['example.ini', 'override.ini'] >>> print(config_override.get('DEFAULT', 'ServerAliveInt...
trusted_official_docs
CPython Docs
= {'ServerAliveInterval': '-1'} >>> with open('override.ini', 'w') as configfile: ... config_override.write(configfile) ... >>> config_override = configparser.ConfigParser() >>> config_override.read(['example.ini', 'override.ini']) ['example.ini', 'override.ini'] >>> print(config_override.get('DEFAULT', 'ServerAliveInt...
= {'ServerAliveInterval': '-1'} >>> with open('override.ini', 'w') as configfile: ... config_override.write(configfile) ... >>> config_override = configparser.ConfigParser() >>> config_override.read(['example.ini', 'override.ini']) ['example.ini', 'override.ini'] >>> print(config_override.get('DEFAULT', 'ServerAliveInt...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8044eacc-1808-4d36-ab6b-bd323f36dd90
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,795
supabase-export-v2
70f263fde7dcaf69
>>> topsecret.get('Port') '50022' >>> topsecret.get('CompressionLevel') '9' >>> topsecret.get('Cipher') >>> topsecret.get('Cipher', '3des-cbc') '3des-cbc' Please note that default values have precedence over fallback values. For instance, in our example the ``'CompressionLevel'`` key was specified only in the ``'DEFAUL...
trusted_official_docs
CPython Docs
>>> topsecret.get('Port') '50022' >>> topsecret.get('CompressionLevel') '9' >>> topsecret.get('Cipher') >>> topsecret.get('Cipher', '3des-cbc') '3des-cbc' Please note that default values have precedence over fallback values. For instance, in our example the ``'CompressionLevel'`` key was specified only in the ``'DEFAUL...
>>> topsecret.get('Port') '50022' >>> topsecret.get('CompressionLevel') '9' >>> topsecret.get('Cipher') >>> topsecret.get('Cipher', '3des-cbc') '3des-cbc' Please note that default values have precedence over fallback values. For instance, in our example the ``'CompressionLevel'`` key was specified only in the ``'DEFAUL...
python, official-docs, cpython, P0
Local_Trusted_Corpus
830a8f81-1c2d-4ba6-a367-e5141f6c446c
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,774
supabase-export-v2
440fd7d8c3d77284
parser much like a dictionary. There are differences, `outlined later <#mapping-protocol-access>`_, but the behavior is very close to what you would expect from a dictionary. Now that we have created and saved a configuration file, let's read it back and explore the data it holds.
trusted_official_docs
CPython Docs
parser much like a dictionary. There are differences, `outlined later <#mapping-protocol-access>`_, but the behavior is very close to what you would expect from a dictionary. Now that we have created and saved a configuration file, let's read it back and explore the data it holds.
parser much like a dictionary. There are differences, `outlined later <#mapping-protocol-access>`_, but the behavior is very close to what you would expect from a dictionary. Now that we have created and saved a configuration file, let's read it back and explore the data it holds.
python, official-docs, cpython, P0
Local_Trusted_Corpus
84bcecf7-c923-4d92-a4c1-7845e1e2c1f6
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,830
supabase-export-v2
2d56f38ad3d8f93e
[Escape] # use a %% to escape the % sign (% is the only character that needs to be escaped): gain: 80%% In the example above, :class:`ConfigParser` with *interpolation* set to ``BasicInterpolation()`` would resolve ``%(home_dir)s`` to the value of ``home_dir`` (``/Users`` in this case). ``%(my_dir)s`` in effect would...
trusted_official_docs
CPython Docs
[Escape] # use a %% to escape the % sign (% is the only character that needs to be escaped): gain: 80%% In the example above, :class:`ConfigParser` with *interpolation* set to ``BasicInterpolation()`` would resolve ``%(home_dir)s`` to the value of ``home_dir`` (``/Users`` in this case). ``%(my_dir)s`` in effect would...
[Escape] # use a %% to escape the % sign (% is the only character that needs to be escaped): gain: 80%% In the example above, :class:`ConfigParser` with *interpolation* set to ``BasicInterpolation()`` would resolve ``%(home_dir)s`` to the value of ``home_dir`` (``/Users`` in this case). ``%(my_dir)s`` in effect would...
python, official-docs, cpython, P0
Local_Trusted_Corpus
86abdb69-065f-40f1-a654-f431a018c007
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,898
supabase-export-v2
59e4b48bb712c5c0
* *default_section*, default value: ``configparser.DEFAULTSECT`` (that is: ``"DEFAULT"``) The convention of allowing a special section of default values for other sections or interpolation purposes is a powerful concept of this library, letting users create complex declarative configurations. This section is normall...
trusted_official_docs
CPython Docs
* *default_section*, default value: ``configparser.DEFAULTSECT`` (that is: ``"DEFAULT"``) The convention of allowing a special section of default values for other sections or interpolation purposes is a powerful concept of this library, letting users create complex declarative configurations. This section is normall...
* *default_section*, default value: ``configparser.DEFAULTSECT`` (that is: ``"DEFAULT"``) The convention of allowing a special section of default values for other sections or interpolation purposes is a powerful concept of this library, letting users create complex declarative configurations. This section is normall...
python, official-docs, cpython, P0
Local_Trusted_Corpus
89a8954a-fd8c-4fe3-9b64-78a6b438d90f
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,902
supabase-export-v2
6cecd42bbfde5d68
* *converters*, default value: not set Config parsers provide option value getters that perform type conversion. By default :meth:`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat`, and :meth:`~ConfigParser.getboolean` are implemented. Should other getters be desirable, users may define them in a subclass or pas...
trusted_official_docs
CPython Docs
* *converters*, default value: not set Config parsers provide option value getters that perform type conversion. By default :meth:`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat`, and :meth:`~ConfigParser.getboolean` are implemented. Should other getters be desirable, users may define them in a subclass or pas...
* *converters*, default value: not set Config parsers provide option value getters that perform type conversion. By default :meth:`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat`, and :meth:`~ConfigParser.getboolean` are implemented. Should other getters be desirable, users may define them in a subclass or pas...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8a4d1d10-4b84-47f3-b042-d46d69a40732
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,918
supabase-export-v2
1a056e8da5178bef
.. doctest:: >>> import re >>> config = """ ... [Section 1] ... option = value ... ... [ Section 2 ] ... another = val ... """ >>> typical = configparser.ConfigParser() >>> typical.read_string(config) >>> typical.sections() ['Section 1', ' Section 2 '] >>> custom = configparser.ConfigParser() >>> custom.SEC...
trusted_official_docs
CPython Docs
.. doctest:: >>> import re >>> config = """ ... [Section 1] ... option = value ... ... [ Section 2 ] ... another = val ... """ >>> typical = configparser.ConfigParser() >>> typical.read_string(config) >>> typical.sections() ['Section 1', ' Section 2 '] >>> custom = configparser.ConfigParser() >>> custom.SEC...
.. doctest:: >>> import re >>> config = """ ... [Section 1] ... option = value ... ... [ Section 2 ] ... another = val ... """ >>> typical = configparser.ConfigParser() >>> typical.read_string(config) >>> typical.sections() ['Section 1', ' Section 2 '] >>> custom = configparser.ConfigParser() >>> custom.SEC...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8bef0268-0758-4c39-826e-919ffd12f043
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,810
supabase-export-v2
7312e679d8481c2a
.. code-block:: ini [Simple Values] key=value spaces in keys=allowed spaces in values=allowed as well spaces around the delimiter = obviously you can also use : to delimit keys from values
trusted_official_docs
CPython Docs
.. code-block:: ini [Simple Values] key=value spaces in keys=allowed spaces in values=allowed as well spaces around the delimiter = obviously you can also use : to delimit keys from values
.. code-block:: ini [Simple Values] key=value spaces in keys=allowed spaces in values=allowed as well spaces around the delimiter = obviously you can also use : to delimit keys from values
python, official-docs, cpython, P0
Local_Trusted_Corpus
8bfac3cc-2e9c-4881-a4d2-20c490fdfb0a
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,975
supabase-export-v2
d656a26984945465
raised. If the *default section* name is passed, :exc:`ValueError` is raised. The name of the section must be a string; if not, :exc:`TypeError` is raised. .. versionchanged:: 3.2 Non-string section names raise :exc:`TypeError`.
trusted_official_docs
CPython Docs
raised. If the *default section* name is passed, :exc:`ValueError` is raised. The name of the section must be a string; if not, :exc:`TypeError` is raised. .. versionchanged:: 3.2 Non-string section names raise :exc:`TypeError`.
raised. If the *default section* name is passed, :exc:`ValueError` is raised. The name of the section must be a string; if not, :exc:`TypeError` is raised. .. versionchanged:: 3.2 Non-string section names raise :exc:`TypeError`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
8c096039-cd27-4f1a-9b1d-a3ef656e8da8
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,879
supabase-export-v2
2d1cc1c04213582e
* *delimiters*, default value: ``('=', ':')`` Delimiters are substrings that delimit keys from values within a section. The first occurrence of a delimiting substring on a line is considered a delimiter. This means values (but not keys) can contain the delimiters.
trusted_official_docs
CPython Docs
* *delimiters*, default value: ``('=', ':')`` Delimiters are substrings that delimit keys from values within a section. The first occurrence of a delimiting substring on a line is considered a delimiter. This means values (but not keys) can contain the delimiters.
* *delimiters*, default value: ``('=', ':')`` Delimiters are substrings that delimit keys from values within a section. The first occurrence of a delimiting substring on a line is considered a delimiter. This means values (but not keys) can contain the delimiters.
python, official-docs, cpython, P0
Local_Trusted_Corpus
8ddc2686-1b45-47b2-9ead-6c95470f3325
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,867
supabase-export-v2
01b9591331166247
files look. With the standard dictionary, every section is stored in the order they were added to the parser. Same goes for options within sections. An alternative dictionary type can be used for example to sort sections and options on write-back.
trusted_official_docs
CPython Docs
files look. With the standard dictionary, every section is stored in the order they were added to the parser. Same goes for options within sections. An alternative dictionary type can be used for example to sort sections and options on write-back.
files look. With the standard dictionary, every section is stored in the order they were added to the parser. Same goes for options within sections. An alternative dictionary type can be used for example to sort sections and options on write-back.
python, official-docs, cpython, P0
Local_Trusted_Corpus
8fd843b8-e3a4-4c4c-a66e-bc509d76cde1
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,887
supabase-export-v2
56059de9e2da3dc1
not necessary = if # is not at line start ... even in multiline values = line #1 ... line #2 ... line #3 ... """) >>> print(parser['hashes']['shebang']) <BLANKLINE> #!/usr/bin/env python # -*- coding: utf-8 -*- >>> print(parser['hashes']['extensions']) <BLANKLINE> enabled_extension another_extension yet_anothe...
trusted_official_docs
CPython Docs
not necessary = if # is not at line start ... even in multiline values = line #1 ... line #2 ... line #3 ... """) >>> print(parser['hashes']['shebang']) <BLANKLINE> #!/usr/bin/env python # -*- coding: utf-8 -*- >>> print(parser['hashes']['extensions']) <BLANKLINE> enabled_extension another_extension yet_anothe...
not necessary = if # is not at line start ... even in multiline values = line #1 ... line #2 ... line #3 ... """) >>> print(parser['hashes']['shebang']) <BLANKLINE> #!/usr/bin/env python # -*- coding: utf-8 -*- >>> print(parser['hashes']['extensions']) <BLANKLINE> enabled_extension another_extension yet_anothe...
python, official-docs, cpython, P0
Local_Trusted_Corpus
90614afa-2ecf-4fb3-b5b5-fffad9ca594e
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,811
supabase-export-v2
d5cdebb96ad957e9
key=value spaces in keys=allowed spaces in values=allowed as well spaces around the delimiter = obviously you can also use : to delimit keys from values [All Values Are Strings] values like this: 1000000 or this: 3.14159265359 are they treated as numbers? : no integers, floats and booleans are held as: strings can...
trusted_official_docs
CPython Docs
key=value spaces in keys=allowed spaces in values=allowed as well spaces around the delimiter = obviously you can also use : to delimit keys from values [All Values Are Strings] values like this: 1000000 or this: 3.14159265359 are they treated as numbers? : no integers, floats and booleans are held as: strings can...
key=value spaces in keys=allowed spaces in values=allowed as well spaces around the delimiter = obviously you can also use : to delimit keys from values [All Values Are Strings] values like this: 1000000 or this: 3.14159265359 are they treated as numbers? : no integers, floats and booleans are held as: strings can...
python, official-docs, cpython, P0
Local_Trusted_Corpus
90b156a4-64b6-49cd-b2dd-716bb78ace93
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,933
supabase-export-v2
2104080288bf90e5
Notice that the next output does not interpolate '%(bar)s' or '%(baz)s'. # This is because we are using a RawConfigParser(). if config.getboolean('Section1', 'a_bool'): print(config.get('Section1', 'foo')) To get interpolation, use :class:`ConfigParser`::
trusted_official_docs
CPython Docs
Notice that the next output does not interpolate '%(bar)s' or '%(baz)s'. # This is because we are using a RawConfigParser(). if config.getboolean('Section1', 'a_bool'): print(config.get('Section1', 'foo')) To get interpolation, use :class:`ConfigParser`::
Notice that the next output does not interpolate '%(bar)s' or '%(baz)s'. # This is because we are using a RawConfigParser(). if config.getboolean('Section1', 'a_bool'): print(config.get('Section1', 'foo')) To get interpolation, use :class:`ConfigParser`::
python, official-docs, cpython, P0
Local_Trusted_Corpus
90b1dcd0-eae7-4d22-9cd9-073112818b5a
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,009
supabase-export-v2
3a3c1cd27813f82f
.. method:: getint(section, option, *, raw=False, vars=None[, fallback]) A convenience method which coerces the *option* in the specified *section* to an integer. See :meth:`get` for explanation of *raw*, *vars* and *fallback*.
trusted_official_docs
CPython Docs
.. method:: getint(section, option, *, raw=False, vars=None[, fallback]) A convenience method which coerces the *option* in the specified *section* to an integer. See :meth:`get` for explanation of *raw*, *vars* and *fallback*.
.. method:: getint(section, option, *, raw=False, vars=None[, fallback]) A convenience method which coerces the *option* in the specified *section* to an integer. See :meth:`get` for explanation of *raw*, *vars* and *fallback*.
python, official-docs, cpython, P0
Local_Trusted_Corpus
90dc2018-50b2-4c91-bb0b-4176e2625236
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,985
supabase-export-v2
48f32d6ecb9ece50
locations (for example, the current directory, the user's home directory, and some system-wide directory), and all existing configuration files in the iterable will be read. If none of the named files exist, the :class:`ConfigParser` instance will contain an empty dataset. An application which requires initial values...
trusted_official_docs
CPython Docs
locations (for example, the current directory, the user's home directory, and some system-wide directory), and all existing configuration files in the iterable will be read. If none of the named files exist, the :class:`ConfigParser` instance will contain an empty dataset. An application which requires initial values...
locations (for example, the current directory, the user's home directory, and some system-wide directory), and all existing configuration files in the iterable will be read. If none of the named files exist, the :class:`ConfigParser` instance will contain an empty dataset. An application which requires initial values...
python, official-docs, cpython, P0
Local_Trusted_Corpus
946d846f-2f5c-4801-8a9d-40214cf3e243
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,981
supabase-export-v2
b45f44588885ae46
.. method:: has_option(section, option) If the given *section* exists, and contains the given *option*, return :const:`True`; otherwise return :const:`False`. If the specified *section* is :const:`None` or an empty string, DEFAULT is assumed.
trusted_official_docs
CPython Docs
.. method:: has_option(section, option) If the given *section* exists, and contains the given *option*, return :const:`True`; otherwise return :const:`False`. If the specified *section* is :const:`None` or an empty string, DEFAULT is assumed.
.. method:: has_option(section, option) If the given *section* exists, and contains the given *option*, return :const:`True`; otherwise return :const:`False`. If the specified *section* is :const:`None` or an empty string, DEFAULT is assumed.
python, official-docs, cpython, P0
Local_Trusted_Corpus
9698aa31-8017-4868-a65a-07cbca9bfa49
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,007
supabase-export-v2
bac236024616ce2b
expanded in the return values, unless the *raw* argument is true. Values for interpolation keys are looked up in the same manner as the option. .. versionchanged:: 3.2 Arguments *raw*, *vars* and *fallback* are keyword only to protect users from trying to use the third argument as the *fallback* fallback (especially...
trusted_official_docs
CPython Docs
expanded in the return values, unless the *raw* argument is true. Values for interpolation keys are looked up in the same manner as the option. .. versionchanged:: 3.2 Arguments *raw*, *vars* and *fallback* are keyword only to protect users from trying to use the third argument as the *fallback* fallback (especially...
expanded in the return values, unless the *raw* argument is true. Values for interpolation keys are looked up in the same manner as the option. .. versionchanged:: 3.2 Arguments *raw*, *vars* and *fallback* are keyword only to protect users from trying to use the third argument as the *fallback* fallback (especially...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9c9178ab-b1ba-45d0-a5fd-8b242bb9868a
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,835
supabase-export-v2
8444ac348f7c99a8
multiple levels. For convenience, if the ``section:`` part is omitted, interpolation defaults to the current section (and possibly the default values from the special section). For example, the configuration specified above with basic interpolation, would look like this with extended interpolation:
trusted_official_docs
CPython Docs
multiple levels. For convenience, if the ``section:`` part is omitted, interpolation defaults to the current section (and possibly the default values from the special section). For example, the configuration specified above with basic interpolation, would look like this with extended interpolation:
multiple levels. For convenience, if the ``section:`` part is omitted, interpolation defaults to the current section (and possibly the default values from the special section). For example, the configuration specified above with basic interpolation, would look like this with extended interpolation:
python, official-docs, cpython, P0
Local_Trusted_Corpus
9d22149d-9b9d-40d1-aefc-0628a3097183
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,777
supabase-export-v2
05e15f74cb5a1959
config['topsecret.server.example'] >>> topsecret['ForwardX11'] 'no' >>> topsecret['Port'] '50022' >>> for key in config['forge.example']: # doctest: +SKIP ... print(key) user compressionlevel serveraliveinterval compression forwardx11 >>> config['forge.example']['ForwardX11'] 'yes' As we can see above, the API is prett...
trusted_official_docs
CPython Docs
config['topsecret.server.example'] >>> topsecret['ForwardX11'] 'no' >>> topsecret['Port'] '50022' >>> for key in config['forge.example']: # doctest: +SKIP ... print(key) user compressionlevel serveraliveinterval compression forwardx11 >>> config['forge.example']['ForwardX11'] 'yes' As we can see above, the API is prett...
config['topsecret.server.example'] >>> topsecret['ForwardX11'] 'no' >>> topsecret['Port'] '50022' >>> for key in config['forge.example']: # doctest: +SKIP ... print(key) user compressionlevel serveraliveinterval compression forwardx11 >>> config['forge.example']['ForwardX11'] 'yes' As we can see above, the API is prett...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9e626085-bd50-4d4e-a70e-383106c79b1f
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,927
supabase-export-v2
ef24246396a665c1
assignments to take place. config.add_section('Section1') config.set('Section1', 'an_int', '15') config.set('Section1', 'a_bool', 'true') config.set('Section1', 'a_float', '3.1415') config.set('Section1', 'baz', 'fun') config.set('Section1', 'bar', 'Python') config.set('Section1', 'foo', '%(bar)s is %(baz)s!') # Writin...
trusted_official_docs
CPython Docs
assignments to take place. config.add_section('Section1') config.set('Section1', 'an_int', '15') config.set('Section1', 'a_bool', 'true') config.set('Section1', 'a_float', '3.1415') config.set('Section1', 'baz', 'fun') config.set('Section1', 'bar', 'Python') config.set('Section1', 'foo', '%(bar)s is %(baz)s!') # Writin...
assignments to take place. config.add_section('Section1') config.set('Section1', 'an_int', '15') config.set('Section1', 'a_bool', 'true') config.set('Section1', 'a_float', '3.1415') config.set('Section1', 'baz', 'fun') config.set('Section1', 'bar', 'Python') config.set('Section1', 'foo', '%(bar)s is %(baz)s!') # Writin...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a0f02f1a-0557-4e28-8adc-f516cf1f4eee
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,968
supabase-export-v2
3641cbf521ca95be
.. versionchanged:: 3.13 Raise a :exc:`MultilineContinuationError` when *allow_no_value* is ``True``, and a key without a value is continued with an indented line. .. versionchanged:: 3.13 The *allow_unnamed_section* argument was added.
trusted_official_docs
CPython Docs
.. versionchanged:: 3.13 Raise a :exc:`MultilineContinuationError` when *allow_no_value* is ``True``, and a key without a value is continued with an indented line. .. versionchanged:: 3.13 The *allow_unnamed_section* argument was added.
.. versionchanged:: 3.13 Raise a :exc:`MultilineContinuationError` when *allow_no_value* is ``True``, and a key without a value is continued with an indented line. .. versionchanged:: 3.13 The *allow_unnamed_section* argument was added.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a13619ec-0dc7-405e-a550-d30abfdcf166
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,923
supabase-export-v2
6f4d8065270d0d2f
for the methods outlined below, mapping protocol access is preferred for new projects. The legacy API is at times more advanced, low-level and downright counterintuitive. An example of writing to a configuration file::
trusted_official_docs
CPython Docs
for the methods outlined below, mapping protocol access is preferred for new projects. The legacy API is at times more advanced, low-level and downright counterintuitive. An example of writing to a configuration file::
for the methods outlined below, mapping protocol access is preferred for new projects. The legacy API is at times more advanced, low-level and downright counterintuitive. An example of writing to a configuration file::
python, official-docs, cpython, P0
Local_Trusted_Corpus
a1a5151f-1373-4416-9edc-20904a74496f
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,885
supabase-export-v2
c1257119f688de30
.. versionchanged:: 3.2 In previous versions of :mod:`!configparser` behaviour matched ``comment_prefixes=('#',';')`` and ``inline_comment_prefixes=(';',)``. Please note that config parsers don't support escaping of comment prefixes so using *inline_comment_prefixes* may prevent users from specifying option values wi...
trusted_official_docs
CPython Docs
.. versionchanged:: 3.2 In previous versions of :mod:`!configparser` behaviour matched ``comment_prefixes=('#',';')`` and ``inline_comment_prefixes=(';',)``. Please note that config parsers don't support escaping of comment prefixes so using *inline_comment_prefixes* may prevent users from specifying option values wi...
.. versionchanged:: 3.2 In previous versions of :mod:`!configparser` behaviour matched ``comment_prefixes=('#',';')`` and ``inline_comment_prefixes=(';',)``. Please note that config parsers don't support escaping of comment prefixes so using *inline_comment_prefixes* may prevent users from specifying option values wi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a3e64a10-d4bc-4beb-8588-ac413e1cb31e
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,770
supabase-export-v2
e1f2fa0afb811928
[topsecret.server.example] Port = 50022 ForwardX11 = no The structure of INI files is described `in the following section <#supported-ini-file-structure>`_. Essentially, the file consists of sections, each of which contains keys with values. :mod:`!configparser` classes can read and write such files. Let's start by cre...
trusted_official_docs
CPython Docs
[topsecret.server.example] Port = 50022 ForwardX11 = no The structure of INI files is described `in the following section <#supported-ini-file-structure>`_. Essentially, the file consists of sections, each of which contains keys with values. :mod:`!configparser` classes can read and write such files. Let's start by cre...
[topsecret.server.example] Port = 50022 ForwardX11 = no The structure of INI files is described `in the following section <#supported-ini-file-structure>`_. Essentially, the file consists of sections, each of which contains keys with values. :mod:`!configparser` classes can read and write such files. Let's start by cre...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a4079753-b562-4908-ba1d-1d8476e0c0be
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,790
supabase-export-v2
167d2dea21cab37f
>>> topsecret.getboolean('ForwardX11') False >>> config['forge.example'].getboolean('ForwardX11') True >>> config.getboolean('forge.example', 'Compression') True Apart from :meth:`~ConfigParser.getboolean`, config parsers also provide equivalent :meth:`~ConfigParser.getint` and :meth:`~ConfigParser.getfloat` methods. Y...
trusted_official_docs
CPython Docs
>>> topsecret.getboolean('ForwardX11') False >>> config['forge.example'].getboolean('ForwardX11') True >>> config.getboolean('forge.example', 'Compression') True Apart from :meth:`~ConfigParser.getboolean`, config parsers also provide equivalent :meth:`~ConfigParser.getint` and :meth:`~ConfigParser.getfloat` methods. Y...
>>> topsecret.getboolean('ForwardX11') False >>> config['forge.example'].getboolean('ForwardX11') True >>> config.getboolean('forge.example', 'Compression') True Apart from :meth:`~ConfigParser.getboolean`, config parsers also provide equivalent :meth:`~ConfigParser.getint` and :meth:`~ConfigParser.getfloat` methods. Y...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a6215eb4-ea62-4b4f-b9a9-4dd6ab89b437
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,966
supabase-export-v2
f789c17c9e93780a
.. versionchanged:: 3.7 The *defaults* argument is read with :meth:`read_dict`, providing consistent behavior across the parser: non-string keys and values are implicitly converted to strings. .. versionchanged:: 3.8 The default *dict_type* is :class:`dict`, since it now preserves insertion order.
trusted_official_docs
CPython Docs
.. versionchanged:: 3.7 The *defaults* argument is read with :meth:`read_dict`, providing consistent behavior across the parser: non-string keys and values are implicitly converted to strings. .. versionchanged:: 3.8 The default *dict_type* is :class:`dict`, since it now preserves insertion order.
.. versionchanged:: 3.7 The *defaults* argument is read with :meth:`read_dict`, providing consistent behavior across the parser: non-string keys and values are implicitly converted to strings. .. versionchanged:: 3.8 The default *dict_type* is :class:`dict`, since it now preserves insertion order.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a9c1c46d-4f82-4aff-8f9e-75aeef73cf70
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,030
supabase-export-v2
532bc36494e08a87
.. method:: optionxform(option) Transforms the option name *option* as found in an input file or as passed in by client code to the form that should be used in the internal structures. The default implementation returns a lower-case version of *option*; subclasses may override this or client code can set an attribut...
trusted_official_docs
CPython Docs
.. method:: optionxform(option) Transforms the option name *option* as found in an input file or as passed in by client code to the form that should be used in the internal structures. The default implementation returns a lower-case version of *option*; subclasses may override this or client code can set an attribut...
.. method:: optionxform(option) Transforms the option name *option* as found in an input file or as passed in by client code to the form that should be used in the internal structures. The default implementation returns a lower-case version of *option*; subclasses may override this or client code can set an attribut...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a9d490a4-bc7a-4e70-a026-fd986d7e34b4
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,920
supabase-export-v2
406adb6c5f7bf432
.. note:: While ConfigParser objects also use an ``OPTCRE`` attribute for recognizing option lines, it's not recommended to override it because that would interfere with constructor options *allow_no_value* and *delimiters*.
trusted_official_docs
CPython Docs
.. note:: While ConfigParser objects also use an ``OPTCRE`` attribute for recognizing option lines, it's not recommended to override it because that would interfere with constructor options *allow_no_value* and *delimiters*.
.. note:: While ConfigParser objects also use an ``OPTCRE`` attribute for recognizing option lines, it's not recommended to override it because that would interfere with constructor options *allow_no_value* and *delimiters*.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a9dc1da2-8950-46c4-b0d0-49ef7b2d0d3f
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,807
supabase-export-v2
7b5e88bbeda08802
By default, a valid section name can be any string that does not contain '\\n'. To change this, see :attr:`ConfigParser.SECTCRE`. The first section name may be omitted if the parser is configured to allow an unnamed top level section with ``allow_unnamed_section=True``. In this case, the keys/values may be retrieved by...
trusted_official_docs
CPython Docs
By default, a valid section name can be any string that does not contain '\\n'. To change this, see :attr:`ConfigParser.SECTCRE`. The first section name may be omitted if the parser is configured to allow an unnamed top level section with ``allow_unnamed_section=True``. In this case, the keys/values may be retrieved by...
By default, a valid section name can be any string that does not contain '\\n'. To change this, see :attr:`ConfigParser.SECTCRE`. The first section name may be omitted if the parser is configured to allow an unnamed top level section with ``allow_unnamed_section=True``. In this case, the keys/values may be retrieved by...
python, official-docs, cpython, P0
Local_Trusted_Corpus
aaa11b03-f63b-4c1a-8169-97bc0a47c634
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,997
supabase-export-v2
c15c342331c0248f
Parse configuration data from a string. Optional argument *source* specifies a context-specific name of the string passed. If not given, ``'<string>'`` is used. This should commonly be a filesystem path or a URL.
trusted_official_docs
CPython Docs
Parse configuration data from a string. Optional argument *source* specifies a context-specific name of the string passed. If not given, ``'<string>'`` is used. This should commonly be a filesystem path or a URL.
Parse configuration data from a string. Optional argument *source* specifies a context-specific name of the string passed. If not given, ``'<string>'`` is used. This should commonly be a filesystem path or a URL.
python, official-docs, cpython, P0
Local_Trusted_Corpus
acc3bc06-3ef1-4b69-8ebf-75287affec0a
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,016
supabase-export-v2
4067ddc8cbe53c88
When *section* is not given, return a list of *section_name*, *section_proxy* pairs, including DEFAULTSECT. Otherwise, return a list of *name*, *value* pairs for the options in the given *section*. Optional arguments have the same meaning as for the :meth:`get` method.
trusted_official_docs
CPython Docs
When *section* is not given, return a list of *section_name*, *section_proxy* pairs, including DEFAULTSECT. Otherwise, return a list of *name*, *value* pairs for the options in the given *section*. Optional arguments have the same meaning as for the :meth:`get` method.
When *section* is not given, return a list of *section_name*, *section_proxy* pairs, including DEFAULTSECT. Otherwise, return a list of *name*, *value* pairs for the options in the given *section*. Optional arguments have the same meaning as for the :meth:`get` method.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ad9d49ba-c4d0-495d-9634-1bc1911ba244
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,013
supabase-export-v2
a4bc852bba5ac4d1
.. method:: getboolean(section, option, *, raw=False, vars=None[, fallback]) A convenience method which coerces the *option* in the specified *section* to a Boolean value. Note that the accepted values for the option are ``'1'``, ``'yes'``, ``'true'``, and ``'on'``, which cause this method to return ``True``, and ``...
trusted_official_docs
CPython Docs
.. method:: getboolean(section, option, *, raw=False, vars=None[, fallback]) A convenience method which coerces the *option* in the specified *section* to a Boolean value. Note that the accepted values for the option are ``'1'``, ``'yes'``, ``'true'``, and ``'on'``, which cause this method to return ``True``, and ``...
.. method:: getboolean(section, option, *, raw=False, vars=None[, fallback]) A convenience method which coerces the *option* in the specified *section* to a Boolean value. Note that the accepted values for the option are ``'1'``, ``'yes'``, ``'true'``, and ``'on'``, which cause this method to return ``True``, and ``...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b0256e46-ec43-4158-9b02-62b71ca02c1e
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,773
supabase-export-v2
9d444207f8351da3
'50022' # mutates the parser >>> topsecret['ForwardX11'] = 'no' # same here >>> config['DEFAULT']['ForwardX11'] = 'yes' >>> with open('example.ini', 'w') as configfile: ... config.write(configfile) ... As you can see, we can treat a config parser much like a dictionary. There are differences, `outlined later <#mapping-...
trusted_official_docs
CPython Docs
'50022' # mutates the parser >>> topsecret['ForwardX11'] = 'no' # same here >>> config['DEFAULT']['ForwardX11'] = 'yes' >>> with open('example.ini', 'w') as configfile: ... config.write(configfile) ... As you can see, we can treat a config parser much like a dictionary. There are differences, `outlined later <#mapping-...
'50022' # mutates the parser >>> topsecret['ForwardX11'] = 'no' # same here >>> config['DEFAULT']['ForwardX11'] = 'yes' >>> with open('example.ini', 'w') as configfile: ... config.write(configfile) ... As you can see, we can treat a config parser much like a dictionary. There are differences, `outlined later <#mapping-...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b16f0b82-2910-4b42-b3fc-ebc1cc7f4511
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,024
supabase-export-v2
c268adb93b67807d
.. note:: Comments in the original configuration file are not preserved when writing the configuration back. What is considered a comment, depends on the given values for *comment_prefix* and *inline_comment_prefix*.
trusted_official_docs
CPython Docs
.. note:: Comments in the original configuration file are not preserved when writing the configuration back. What is considered a comment, depends on the given values for *comment_prefix* and *inline_comment_prefix*.
.. note:: Comments in the original configuration file are not preserved when writing the configuration back. What is considered a comment, depends on the given values for *comment_prefix* and *inline_comment_prefix*.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b5107820-c6f4-40d5-89b0-50eca29c6f1e
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,014
supabase-export-v2
976d1465f4dfb180
values are checked in a case-insensitive manner. Any other value will cause it to raise :exc:`ValueError`. See :meth:`get` for explanation of *raw*, *vars* and *fallback*. .. method:: items(raw=False, vars=None) items(section, raw=False, vars=None)
trusted_official_docs
CPython Docs
values are checked in a case-insensitive manner. Any other value will cause it to raise :exc:`ValueError`. See :meth:`get` for explanation of *raw*, *vars* and *fallback*. .. method:: items(raw=False, vars=None) items(section, raw=False, vars=None)
values are checked in a case-insensitive manner. Any other value will cause it to raise :exc:`ValueError`. See :meth:`get` for explanation of *raw*, *vars* and *fallback*. .. method:: items(raw=False, vars=None) items(section, raw=False, vars=None)
python, official-docs, cpython, P0
Local_Trusted_Corpus
bbcc3fd8-d781-4bc6-b6a8-1d12c1197fde
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,871
supabase-export-v2
8d9c163056de314c
'section3': {'foo': 'x', ... 'bar': 'y', ... 'baz': 'z'} ... }) >>> parser.sections() ['section1', 'section2', 'section3'] >>> [option for option in parser['section3']] ['foo', 'bar', 'baz'] * *allow_no_value*, default value: ``False``
trusted_official_docs
CPython Docs
'section3': {'foo': 'x', ... 'bar': 'y', ... 'baz': 'z'} ... }) >>> parser.sections() ['section1', 'section2', 'section3'] >>> [option for option in parser['section3']] ['foo', 'bar', 'baz'] * *allow_no_value*, default value: ``False``
'section3': {'foo': 'x', ... 'bar': 'y', ... 'baz': 'z'} ... }) >>> parser.sections() ['section1', 'section2', 'section3'] >>> [option for option in parser['section3']] ['foo', 'bar', 'baz'] * *allow_no_value*, default value: ``False``
python, official-docs, cpython, P0
Local_Trusted_Corpus
beeca9a9-297d-420f-b836-2262e5b1f406
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,908
supabase-export-v2
ba65e61bd667c091
.. doctest:: >>> custom = configparser.ConfigParser() >>> custom['section1'] = {'funky': 'nope'} >>> custom['section1'].getboolean('funky') Traceback (most recent call last): ... ValueError: Not a boolean: nope >>> custom.BOOLEAN_STATES = {'sure': True, 'nope': False} >>> custom['section1'].getboolean('funky') F...
trusted_official_docs
CPython Docs
.. doctest:: >>> custom = configparser.ConfigParser() >>> custom['section1'] = {'funky': 'nope'} >>> custom['section1'].getboolean('funky') Traceback (most recent call last): ... ValueError: Not a boolean: nope >>> custom.BOOLEAN_STATES = {'sure': True, 'nope': False} >>> custom['section1'].getboolean('funky') F...
.. doctest:: >>> custom = configparser.ConfigParser() >>> custom['section1'] = {'funky': 'nope'} >>> custom['section1'].getboolean('funky') Traceback (most recent call last): ... ValueError: Not a boolean: nope >>> custom.BOOLEAN_STATES = {'sure': True, 'nope': False} >>> custom['section1'].getboolean('funky') F...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c42564b2-ec6a-4ea2-9f5a-a86790dc9891
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,772
supabase-export-v2
e390ad2a42cb55d5
.. doctest:: >>> import configparser >>> config = configparser.ConfigParser() >>> config['DEFAULT'] = {'ServerAliveInterval': '45', ... 'Compression': 'yes', ... 'CompressionLevel': '9'} >>> config['forge.example'] = {} >>> config['forge.example']['User'] = 'hg' >>> config['topsecret.server.example'] = {} >>> t...
trusted_official_docs
CPython Docs
.. doctest:: >>> import configparser >>> config = configparser.ConfigParser() >>> config['DEFAULT'] = {'ServerAliveInterval': '45', ... 'Compression': 'yes', ... 'CompressionLevel': '9'} >>> config['forge.example'] = {} >>> config['forge.example']['User'] = 'hg' >>> config['topsecret.server.example'] = {} >>> t...
.. doctest:: >>> import configparser >>> config = configparser.ConfigParser() >>> config['DEFAULT'] = {'ServerAliveInterval': '45', ... 'Compression': 'yes', ... 'CompressionLevel': '9'} >>> config['forge.example'] = {} >>> config['forge.example']['User'] = 'hg' >>> config['topsecret.server.example'] = {} >>> t...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c4407efe-756b-4af4-8c5d-2b6882cb6319
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,958
supabase-export-v2
4a233e1d748b99bc
When *allow_unnamed_section* is ``True`` (default: ``False``), the first section name can be omitted. See the `"Unnamed Sections" section <#unnamed-sections>`_. It is possible to read several configurations into a single :class:`ConfigParser`, where the most recently added configuration has the highest priority. Any ...
trusted_official_docs
CPython Docs
When *allow_unnamed_section* is ``True`` (default: ``False``), the first section name can be omitted. See the `"Unnamed Sections" section <#unnamed-sections>`_. It is possible to read several configurations into a single :class:`ConfigParser`, where the most recently added configuration has the highest priority. Any ...
When *allow_unnamed_section* is ``True`` (default: ``False``), the first section name can be omitted. See the `"Unnamed Sections" section <#unnamed-sections>`_. It is possible to read several configurations into a single :class:`ConfigParser`, where the most recently added configuration has the highest priority. Any ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c7d6a90e-c81c-41ca-9fc5-3d4c8d3ad155
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,932
supabase-export-v2
4aac65c0b3496c3f
not a float # getint() and getboolean() also do this for their respective types a_float = config.getfloat('Section1', 'a_float') an_int = config.getint('Section1', 'an_int') print(a_float + an_int) # Notice that the next output does not interpolate '%(bar)s' or '%(baz)s'. # This is because we are using a RawConfigParse...
trusted_official_docs
CPython Docs
not a float # getint() and getboolean() also do this for their respective types a_float = config.getfloat('Section1', 'a_float') an_int = config.getint('Section1', 'an_int') print(a_float + an_int) # Notice that the next output does not interpolate '%(bar)s' or '%(baz)s'. # This is because we are using a RawConfigParse...
not a float # getint() and getboolean() also do this for their respective types a_float = config.getfloat('Section1', 'a_float') an_int = config.getint('Section1', 'an_int') print(a_float + an_int) # Notice that the next output does not interpolate '%(bar)s' or '%(baz)s'. # This is because we are using a RawConfigParse...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c7edd8dc-8d4f-4265-b036-691b6bc076a8
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,892
supabase-export-v2
3b99d863c3b4a1fe
* *empty_lines_in_values*, default value: ``True`` In config parsers, values can span multiple lines as long as they are indented more than the key that holds them. By default parsers also let empty lines to be parts of values. At the same time, keys can be arbitrarily indented themselves to improve readability. In ...
trusted_official_docs
CPython Docs
* *empty_lines_in_values*, default value: ``True`` In config parsers, values can span multiple lines as long as they are indented more than the key that holds them. By default parsers also let empty lines to be parts of values. At the same time, keys can be arbitrarily indented themselves to improve readability. In ...
* *empty_lines_in_values*, default value: ``True`` In config parsers, values can span multiple lines as long as they are indented more than the key that holds them. By default parsers also let empty lines to be parts of values. At the same time, keys can be arbitrarily indented themselves to improve readability. In ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c8dae7fb-7984-48e5-8318-a2e120afb295
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,760
supabase-export-v2
8e90ff6f7e55db85
Module :mod:`tomllib` TOML is a well-specified format for application configuration files. It is specifically designed to be an improved version of INI. Module :mod:`shlex` Support for creating Unix shell-like mini-languages which can also be used for application configuration files.
trusted_official_docs
CPython Docs
Module :mod:`tomllib` TOML is a well-specified format for application configuration files. It is specifically designed to be an improved version of INI. Module :mod:`shlex` Support for creating Unix shell-like mini-languages which can also be used for application configuration files.
Module :mod:`tomllib` TOML is a well-specified format for application configuration files. It is specifically designed to be an improved version of INI. Module :mod:`shlex` Support for creating Unix shell-like mini-languages which can also be used for application configuration files.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c9036cf7-fdd6-4012-80b3-b7dc9611ebcb
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,021
supabase-export-v2
e2a59fa1029298d4
.. method:: write(fileobject, space_around_delimiters=True) Write a representation of the configuration to the specified :term:`file object`, which must be opened in text mode (accepting strings). This representation can be parsed by a future :meth:`read` call. If *space_around_delimiters* is true, delimiters betwee...
trusted_official_docs
CPython Docs
.. method:: write(fileobject, space_around_delimiters=True) Write a representation of the configuration to the specified :term:`file object`, which must be opened in text mode (accepting strings). This representation can be parsed by a future :meth:`read` call. If *space_around_delimiters* is true, delimiters betwee...
.. method:: write(fileobject, space_around_delimiters=True) Write a representation of the configuration to the specified :term:`file object`, which must be opened in text mode (accepting strings). This representation can be parsed by a future :meth:`read` call. If *space_around_delimiters* is true, delimiters betwee...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c95c6a59-c64c-48f1-bce0-0cb2f671c1cb
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,913
supabase-export-v2
9c70087c0ce551b3
.. doctest:: >>> config = """ ... [Section1] ... Key = Value ... ... [Section2] ... AnotherKey = Value ... """ >>> typical = configparser.ConfigParser() >>> typical.read_string(config) >>> list(typical['Section1'].keys()) ['key'] >>> list(typical['Section2'].keys()) ['anotherkey'] >>> custom = configparser....
trusted_official_docs
CPython Docs
.. doctest:: >>> config = """ ... [Section1] ... Key = Value ... ... [Section2] ... AnotherKey = Value ... """ >>> typical = configparser.ConfigParser() >>> typical.read_string(config) >>> list(typical['Section1'].keys()) ['key'] >>> list(typical['Section2'].keys()) ['anotherkey'] >>> custom = configparser....
.. doctest:: >>> config = """ ... [Section1] ... Key = Value ... ... [Section2] ... AnotherKey = Value ... """ >>> typical = configparser.ConfigParser() >>> typical.read_string(config) >>> list(typical['Section1'].keys()) ['key'] >>> list(typical['Section2'].keys()) ['anotherkey'] >>> custom = configparser....
python, official-docs, cpython, P0
Local_Trusted_Corpus
cb4f587e-a790-47f8-92dd-5082d25d1ca2
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,049
supabase-export-v2
b28faab1ccb3aafa
Add a section named *section* or :const:`UNNAMED_SECTION` to the instance. If the given section already exists, :exc:`DuplicateSectionError` is raised. If the *default section* name is passed, :exc:`ValueError` is raised. If :const:`UNNAMED_SECTION` is passed and support is disabled, :exc:`UnnamedSectionDisabledErro...
trusted_official_docs
CPython Docs
Add a section named *section* or :const:`UNNAMED_SECTION` to the instance. If the given section already exists, :exc:`DuplicateSectionError` is raised. If the *default section* name is passed, :exc:`ValueError` is raised. If :const:`UNNAMED_SECTION` is passed and support is disabled, :exc:`UnnamedSectionDisabledErro...
Add a section named *section* or :const:`UNNAMED_SECTION` to the instance. If the given section already exists, :exc:`DuplicateSectionError` is raised. If the *default section* name is passed, :exc:`ValueError` is raised. If :const:`UNNAMED_SECTION` is passed and support is disabled, :exc:`UnnamedSectionDisabledErro...
python, official-docs, cpython, P0
Local_Trusted_Corpus
cb71b1a4-7733-464a-abd8-4b1ebefcce12
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,834
supabase-export-v2
a5d93d7f04c79b8c
.. class:: ExtendedInterpolation() An alternative handler for interpolation which implements a more advanced syntax, used for instance in ``zc.buildout``. Extended interpolation is using ``${section:option}`` to denote a value from a foreign section. Interpolation can span multiple levels. For convenience, if the ``...
trusted_official_docs
CPython Docs
.. class:: ExtendedInterpolation() An alternative handler for interpolation which implements a more advanced syntax, used for instance in ``zc.buildout``. Extended interpolation is using ``${section:option}`` to denote a value from a foreign section. Interpolation can span multiple levels. For convenience, if the ``...
.. class:: ExtendedInterpolation() An alternative handler for interpolation which implements a more advanced syntax, used for instance in ``zc.buildout``. Extended interpolation is using ``${section:option}`` to denote a value from a foreign section. Interpolation can span multiple levels. For convenience, if the ``...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ce7caf00-207d-43c7-8d1c-33b1f6530c4e
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
15,050
supabase-export-v2
5f77fc7275e04f72
exists, :exc:`DuplicateSectionError` is raised. If the *default section* name is passed, :exc:`ValueError` is raised. If :const:`UNNAMED_SECTION` is passed and support is disabled, :exc:`UnnamedSectionDisabledError` is raised. Type of *section* is not checked which lets users create non-string named sections. This beh...
trusted_official_docs
CPython Docs
exists, :exc:`DuplicateSectionError` is raised. If the *default section* name is passed, :exc:`ValueError` is raised. If :const:`UNNAMED_SECTION` is passed and support is disabled, :exc:`UnnamedSectionDisabledError` is raised. Type of *section* is not checked which lets users create non-string named sections. This beh...
exists, :exc:`DuplicateSectionError` is raised. If the *default section* name is passed, :exc:`ValueError` is raised. If :const:`UNNAMED_SECTION` is passed and support is disabled, :exc:`UnnamedSectionDisabledError` is raised. Type of *section* is not checked which lets users create non-string named sections. This beh...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d04281db-0341-412b-8729-8c1725aa4019
CPython Docs
file://datasets/cpython/Doc/library/configparser.rst
unknown
1c1a2652-09ff-48b4-9ab2-aae53e157cab
14,839
supabase-export-v2
c4f5445b28417c85
[Escape] # use a $$ to escape the $ sign ($ is the only character that needs to be escaped): cost: $$80 Values from other sections can be fetched as well:
trusted_official_docs
CPython Docs
[Escape] # use a $$ to escape the $ sign ($ is the only character that needs to be escaped): cost: $$80 Values from other sections can be fetched as well:
[Escape] # use a $$ to escape the $ sign ($ is the only character that needs to be escaped): cost: $$80 Values from other sections can be fetched as well:
python, official-docs, cpython, P0
Local_Trusted_Corpus