pybitmessage.bmconfigparser module

BMConfigParser class definition and default configuration settings

class BMConfigParser(defaults=None, dict_type=<class 'collections.OrderedDict'>, allow_no_value=False)[source]

Bases: ConfigParser.SafeConfigParser

Singleton class inherited from ConfigParser.SafeConfigParser with additional methods specific to bitmessage config.

set(section, option, value=None)
get(section, option, **kwargs)

Try returning temporary value before using parent get()

setTemp(section, option, value=None)

Temporary set option to value, not saving.

safeGetBoolean(section, option)

Return value as boolean, False on exceptions

safeGetInt(section, option, default=0)

Return value as integer, default on exceptions, 0 if default missing

safeGetFloat(section, option, default=0.0)

Return value as float, default on exceptions, 0.0 if default missing

safeGet(section, option, default=None)

Return value as is, default on exceptions, None if default missing

items(section, raw=False, variables=None)

Return section variables as parent, but override the “raw” argument to always True


Return a list of local bitmessage addresses (from section labels)


Save the runtime config onto the filesystem

validate(section, option, value)

Input validator interface (using factory pattern)

static validate_bitmessagesettings_maxoutboundconnections(value)

Reject maxoutboundconnections that are too high or too low

search_addresses(address, searched_text)

Return the searched label of MyAddress


“Disabling the specific Address


“Enabling the specific Address

read_file(fp, filename=None)

Like read() but the argument must be a file-like object.

The `fp’ argument must have a `readline’ method. Optional second argument is the `filename’, which if not given, is taken from If fp has no `name’ attribute, `<???>’ is used.