ConfigVariable

from panda3d.core import ConfigVariable
class ConfigVariable

Bases: ConfigVariableBase

This 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 ConfigVariableCore and/or ConfigDeclaration, more or less duplicating the interface presented there.

Inheritance diagram

Inheritance diagram of ConfigVariable

__init__(*args, **kwargs)
clearValue()

C++ Interface: clear_value(const ConfigVariable self)

/**
  • Removes the value assigned to this variable, and lets its original value

  • (as read from the prc files) show through.

*/

clear_value()

C++ Interface: clear_value(const ConfigVariable self)

/**
  • Removes the value assigned to this variable, and lets its original value

  • (as read from the prc files) show through.

*/

getNumWords()

C++ Interface: get_num_words(ConfigVariable self)

/**
  • Returns the number of words in the variable’s value. A word is defined as

  • a sequence of non-whitespace characters delimited by whitespace.

*/

getStringValue()

C++ Interface: get_string_value(ConfigVariable self)

/**
  • Returns the toplevel value of the variable, formatted as a string.

*/

get_num_words()

C++ Interface: get_num_words(ConfigVariable self)

/**
  • Returns the number of words in the variable’s value. A word is defined as

  • a sequence of non-whitespace characters delimited by whitespace.

*/

get_string_value()

C++ Interface: get_string_value(ConfigVariable self)

/**
  • Returns the toplevel value of the variable, formatted as a string.

*/

setStringValue()

C++ Interface: set_string_value(const ConfigVariable self, str 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.

*/

set_string_value()

C++ Interface: set_string_value(const ConfigVariable self, str 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.

*/