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

digraph inheritance3c9dbe0966 { 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=""]; "ConfigVariableFilename" [URL="acron.core.ConfigVariableFilename.html#acron.core.ConfigVariableFilename",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "ConfigVariable" -> "ConfigVariableFilename" [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=""]; }
ConfigVariableFilename.__bool__()

Returns true if the variable is not empty.

ConfigVariableFilename.__eq__()

Comparison operators are handy.

ConfigVariableFilename.__fspath__()

Allows a ConfigVariableFilename object to be passed to any Python function that accepts an os.PathLike object.

Added in version 1.10.13.

ConfigVariableFilename.__getitem__()
ConfigVariableFilename.__init__()
ConfigVariableFilename.__lt__()
ConfigVariableFilename.__ne__()
ConfigVariableFilename.assign()
ConfigVariableFilename.c_str()

These methods help the ConfigVariableFilename act like a Filename object.

ConfigVariableFilename.empty()
ConfigVariableFilename.get_basename()

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

ConfigVariableFilename.get_basename_wo_extension()

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

ConfigVariableFilename.get_default_value()

Returns the variable’s default value.

ConfigVariableFilename.get_dirname()

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

ConfigVariableFilename.get_extension()

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

ConfigVariableFilename.get_fullpath()

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.

ConfigVariableFilename.get_fullpath_wo_extension()

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

ConfigVariableFilename.get_value()

Returns the variable’s value.

ConfigVariableFilename.get_word()

Returns the variable’s nth value.

ConfigVariableFilename.length()
ConfigVariableFilename.set_value()

Reassigns the variable’s local value.

ConfigVariableFilename.set_word()

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