pydox.get_configdir

Contents

pydox.get_configdir#

get_configdir() → str[source]#

Return the string path of the user configuration directory.

The directory is chosen as follows:

  1. If the PYDOXCONFIGDIR environment variable is supplied, choose that.

    • On Linux, follow the XDG specification: - and look first in $XDG_CONFIG_HOME, if defined, - or $HOME/.config.

    • On other platforms, choose $HOME/.pydox.

  2. If the chosen directory exists and is writable, use that as the configuration directory.

  3. Else, create a temporary directory, and use it as the configuration directory.

Adapted from Matplotlib: matplotlib/matplotlib