Loading...
Searching...
No Matches

decode_value
encode_value
get_config
help_text
HOME
init
initialized
is_game
is_system
load_config
lock
module_get_config
module_info
module_init
module_option
option
parse_args
pname
read_cache
read_config
read_data
read_runtime
read_spool
remove_cache
remove_config
remove_data
remove_runtime
remove_spool
remove_temp
save_config
unlock
version_text
write_cache
write_config
write_data
write_log
write_runtime
write_spool
write_temp
XDG_CACHE_HOME
XDG_CONFIG_DIRS
XDG_CONFIG_HOME
XDG_DATA_DIRS
XDG_DATA_HOME
XDG_RUNTIME_DIR

## 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

  config | Configuration dict. Deprecated. Keep set to None.
  packagename | The name of the program. This is used as a default for all other functions. It has a default of the basename of the program.
  system | If True, system paths will be used for writing and user paths will be ignored for reading.
  game | If 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: