On this page
  1. configparser.RawConfigParser
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

configparser.RawConfigParser

Prev: configparser.ParsingError | Up: configparser | Next: configparser.SectionProxy
Rel: configparser.BasicInterpolation, configparser.ConfigParser, configparser.ConverterMapping, configparser.DuplicateOptionError
Ref: docs.python.org — configparser.RawConfigParser
Tags: #public #python3 #stdlib #configparser


Import

import configparser
from configparser import RawConfigParser

Signature & Overview

configparser.RawConfigParser(defaults=None, dict_type=<class 'dict'>, allow_no_value=False, *, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section='DEFAULT', interpolation=<object object at 0x1040b4c80>, converters=<object object at 0x1040b4c80>, allow_unnamed_section=False)

ConfigParser that does not do interpolation.

Methods & Attributes

Usage

import configparser

cp = configparser.RawConfigParser()
cp.read_string("[s]\nfmt = 100% raw\n")
assert cp["s"]["fmt"] == "100% raw"

Gotchas

REPL Inspect

from configparser import RawConfigParser
help(RawConfigParser)

Linked from

Related notes