config Submodule

The config submodule serves as a central location for pyprocgame runtime configuration settings. When this module is loaded the YAML format configuration file located at ~/.pyprocgame/config.yaml is loaded (if it exists) into values. Other modules may then access the data structure either directly or by using the value_for_key_path().

See System Configuration File for a complete description of the system configuration file format.

Members

procgame.config.value_for_key_path(keypath, default=None)

Returns the value at the given keypath within values.

A key path is a list of components delimited by dots (periods). The components are interpreted as dictionary keys within the structure. For example, the key path 'a.b' would yield 'c' with the following values dictionary:

{'a':{'b':'c'}}

If the key path does not exist default will be returned.

procgame.config.values

The configuration data structure loaded from ~/.pyprocgame/config.yaml when this submodule is loaded.

Table Of Contents

Previous topic

procgame Module Reference

Next topic

desktop Submodule

This Page