WrightTools.kit.INI

class WrightTools.kit.INI(filepath)[source]

Handle communication with an INI file.

__init__(filepath)[source]

Create an INI handler object.

Parameters:

filepath (path-like) – Filepath.

Methods

__init__(filepath)

Create an INI handler object.

add_section(section)

Add section.

clear()

Remove all contents from file.

get_options(section)

List the options in a section.

has_option(section, option)

Test if file has option.

has_section(section)

Test if file has section.

read(section, option)

Read from file.

write(section, option, value)

Write to file.

Attributes

dictionary

Get a python dictionary of contents.

sections

List of sections.