ConfigVariable¶
-
class ConfigVariable¶
Bases:
ConfigVariableBaseThis is a generic, untyped ConfigVariable. It is also the base class for the typed ConfigVariables, and contains all of the code common to ConfigVariables of all types (except
ConfigVariableList, which is a bit of a special case).Mostly, this class serves as a thin wrapper around
ConfigVariableCoreand/orConfigDeclaration, more or less duplicating the interface presented there.Inheritance diagram
digraph inheritance4982167773 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "ConfigFlags" [URL="acron.core.ConfigFlags.html#acron.core.ConfigFlags",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ConfigFlags" [arrowsize=0.75,style=""]; "ConfigVariable" [URL="acron.core.ConfigVariable.html#acron.core.ConfigVariable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "ConfigVariableBase" -> "ConfigVariable" [arrowsize=0.75,style=""]; "ConfigVariableBase" [URL="acron.core.ConfigVariableBase.html#acron.core.ConfigVariableBase",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "ConfigFlags" -> "ConfigVariableBase" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; }- ConfigVariable.__init__()¶
This constructor is only intended to be called from a specialized ConfigVariableFoo derived class.
This constructor is only intended to be called from a specialized ConfigVariableFoo derived class.
Use this constructor to make a
ConfigVariableof an unspecified type. Usually you’d want to do this just to reference a previously-definedConfigVariableof a specific type, without having to know what type it is.
- ConfigVariable.__reduce__()¶
- ConfigVariable.clear_value()¶
Removes the value assigned to this variable, and lets its original value (as read from the prc files) show through.
- ConfigVariable.get_num_words()¶
Returns the number of words in the variable’s value. A word is defined as a sequence of non-whitespace characters delimited by whitespace.
- ConfigVariable.get_string_value()¶
Returns the toplevel value of the variable, formatted as a string.
- ConfigVariable.set_string_value()¶
Changes the value assigned to this variable. This creates a local value that shadows any values defined in the .prc files, until
clear_local_value()is called.