PyDocs

Nav

File Formats

ConfigParser.getboolean

  • ConfigParser.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 '0', 'no', 'false', and 'off', which cause it to return False. These string values are checked in a case-insensitive manner. Any other value will cause it to raise ValueError. See get() for explanation of raw, vars and fallback.
1 Example
>>> topsecret.getboolean('ForwardX11')
False
>>> config['forge.example'].getboolean('ForwardX11')
True
>>> config.getboolean('forge.example', 'Compression')
True
from the Python docs
See Also
No see-alsos for configparser/ConfigParser.getboolean
0 Notes
No notes for ConfigParser.getboolean