_Configuration.grep
- _Configuration.grep(search)
grep in the configuration any section or property matching the argument. If a section matches the argument, the whole section is displayed.
- Parameters:
search (
str) – The string to find.
Example
import contextlib
import io
import pyagrum as gum
gum.config.push()
gum.config.reset()
with contextlib.redirect_stdout(io.StringIO()) as out:
gum.config.grep("visibleDigits") # grep() prints its result
print(out.getvalue().strip())
# [tensor]
# visibleDigits = 4
# [influenceDiagram]
# utilityVisibleDigits = 2
# [histogram]
# horizontalVisibleDigits = 2
# verticalVisibleDigits = 2
gum.config.pop()
Class