panda3d.core.ConfigVariableFilename

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.expandFrom() 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

__init__(param0: ConfigVariableFilename) → None
__init__(name: str) → None
__init__(name: str, default_value: Filename, description: str, flags: int) → None
assign(value: Filename) → ConfigVariableFilename
Return type

ConfigVariableFilename

cStr() → str

These methods help the ConfigVariableFilename act like a Filename object.

empty() → bool
length() → size_t
Return type

size_t

getFullpath() → 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.

getDirname() → str

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

getBasename() → str

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

getFullpathWoExtension() → str

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

getBasenameWoExtension() → str

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

getExtension() → str

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

setValue(value: Filename) → None

Reassigns the variable’s local value.

getValue() → Filename

Returns the variable’s value.

Return type

Filename

getDefaultValue() → Filename

Returns the variable’s default value.

Return type

Filename

getWord(n: size_t) → Filename

Returns the variable’s nth value.

Return type

Filename

setWord(n: size_t, value: Filename) → None

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

property value
Getter

Returns the variable’s value.

Setter

Reassigns the variable’s local value.

Return type

Filename

property default_value

Returns the variable’s default value.

Return type

Filename