python-fhs
Python module for using the FHS and XDG basedir paths.
Loading...
Searching...
No Matches

◆ init()

fhs.init (   config = None,
  help = None,
  version = None,
  contact = None,
  packagename = None,
  system = None,
  game = False 
)

Initialize the module.

This function must be called before any other in this module (except module_init(), which must be called before this function). Configuration is read from the commandline, and from the configuration files named <packagename>.ini in any of the configuration directories, or specified with –configfile. A configuration file must contain name=value pairs. The configuration that is used can be saved using –saveconfig, which can optionally have the filename to save to as a parameter.

Parameters
configConfiguration dict. Deprecated. Keep set to None.
packagenameThe name of the program. This is used as a default for all other functions. It has a default of the basename of the program.
systemIf True, system paths will be used for writing and user paths will be ignored for reading.
gameIf True, game system directories will be used (/usr/games, /usr/share/games, etc.) instead of regular system directories.
Returns
Configuration from commandline and config file. This is a dict with the same keys as were previously passed through calls to option(), with the values that were specified as their values.

Definition at line 615 of file fhs.py.

Here is the call graph for this function:
Here is the caller graph for this function: