neurolang.config package

class neurolang.config.NeurolangConfigParser(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>, converters=<object object>)

Bases: ConfigParser

Attributes:
converters

Methods

add_section(section)

Create a new section in the configuration.

clear()

get(section, option, *[, raw, vars, fallback])

Get an option value for a given section.

getint(section, option, *[, raw, vars, fallback])

has_option(section, option)

Check for the existence of a given option in a given section. If the specified `section' is None or an empty string, DEFAULT is assumed. If the specified `section' does not exist, returns False.

has_section(section)

Indicate whether the named section is present in the configuration.

items([section, raw, vars])

Return a list of (name, value) tuples for each option in a section.

keys()

options(section)

Return a list of option names for the given section name.

pop(k[,d])

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem()

Remove a section from the parser and return it as a (section_name, section_proxy) tuple.

read(filenames[, encoding])

Read and parse a filename or an iterable of filenames.

read_dict(dictionary[, source])

Read configuration from a dictionary.

read_file(f[, source])

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

read_string(string[, source])

Read configuration from a given string.

readfp(fp[, filename])

Deprecated, use read_file instead.

remove_option(section, option)

Remove an option.

remove_section(section)

Remove a file section.

sections()

Return a list of section names, excluding [DEFAULT]

set(section, option[, value])

Set an option.

set_query_backend(backend)

Convenience method to set the backend used by Neurolang.

setdefault(k[,d])

switch_backend()

Changing the backend value in the config object is not enough to switch the backends since this config value is evaluated at import time in some modules to figure out which classes to import.

update([E, ]**F)

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values()

write(fp[, space_around_delimiters])

Write an .ini-format representation of the configuration state.

defaults

disable_expression_type_printing

disable_probabilistic_solver_check_unate

enable_expression_type_printing

enable_probabilistic_solver_check_unate

expression_type_printing

get_probabilistic_solver_check_unate

get_structural_knowledge_namespace

getboolean

getfloat

optionxform

set_structural_knowledge_namespace

switch_expression_type_printing

disable_expression_type_printing()
disable_probabilistic_solver_check_unate()
enable_expression_type_printing()
enable_probabilistic_solver_check_unate()
expression_type_printing()
get_probabilistic_solver_check_unate()
get_structural_knowledge_namespace()
set_query_backend(backend)

Convenience method to set the backend used by Neurolang.

set_structural_knowledge_namespace(name)
switch_backend()

Changing the backend value in the config object is not enough to switch the backends since this config value is evaluated at import time in some modules to figure out which classes to import. So we need to reimport these modules after changing the backend value in the config.

switch_expression_type_printing()

Subpackages