from panda3d.core import ConfigVariableFilename
class ConfigVariableFilename


Bases: ConfigVariable

This is a convenience class to specialize ConfigVariable as a Filename type. It is almost the same thing as ConfigVariableString, except it handles an implicit Filename.expand_from() operation so that the user may put OS-specific filenames, or filenames based on environment variables, in the prc file.

Inheritance diagram

Inheritance diagram of ConfigVariableFilename

__bool__() bool

Returns true if the variable is not empty.

__eq__(other: Filename) bool

Comparison operators are handy.

__getitem__(n: int) char
__init__(param0: ConfigVariableFilename)
__init__(name: str)
__init__(name: str, default_value: Filename, description: str, flags: int)
__lt__(other: Filename) bool
__ne__(other: Filename) bool
assign(value: Filename) ConfigVariableFilename
c_str() str

These methods help the ConfigVariableFilename act like a Filename object.

property default_value Filename

Returns the variable’s default value.

empty() bool
get_basename() str

Returns the basename part of the filename. This is everything in the filename after the rightmost slash, including any extensions.

get_basename_wo_extension() str

Returns the basename part of the filename, without the file extension.

get_default_value() Filename

Returns the variable’s default value.

get_dirname() str

Returns the directory part of the filename. This is everything in the filename up to, but not including the rightmost slash.

get_extension() str

Returns the file extension. This is everything after the rightmost dot, if there is one, or the empty string if there is not.

get_fullpath() str

Returns the entire filename: directory, basename, extension. This is the same thing returned by the string typecast operator, so this function is a little redundant.

get_fullpath_wo_extension() str

Returns the full filename–directory and basename parts–except for the extension.

get_value() Filename

Returns the variable’s value.

get_word(n: int) Filename

Returns the variable’s nth value.

length() int
set_value(value: Filename)

Reassigns the variable’s local value.

set_word(n: int, value: Filename)

Reassigns the variable’s nth value. This makes a local copy of the variable’s overall value.

property value Filename

Returns the variable’s value.


Reassigns the variable’s local value.