Gimp.ConfigPath.expand
@accepts(unicode, bool)
@returns(unicode)
def expand(path, recode):
# Python wrapper for gimp_config_path_expand()
Paths as stored in gimprc and other config files have to be treated special. The string may contain special identifiers such as for example ${gimp_dir} that have to be substituted before use. Also the user's filesystem may be in a different encoding than UTF-8 (which is what is used for the gimprc). This function does the variable substitution for you and can also attempt to convert to the filesystem encoding.
To reverse the expansion, use Gimp.ConfigPath.unexpand.
Since 2.4
- path
a NUL-terminated string in UTF-8 encoding
- recode
whether to convert to the filesystem's encoding
- Returns