Setting class retrieve and set user configuration

class core.settings.Settings[source]

Bases: object, ConfigParser.SafeConfigParser

Retrieve and set user configuration

add_option(section, option, value='NotSet')[source]
add_section_update_handler(section, handler)[source]
exists(section)

Indicate whether the named section is present in the configuration.

The DEFAULT section is not acknowledged.

get(section, option)[source]
read()[source]

Overriden method to read the configuration from Openalea's default configuration file

set(section, option, value)[source]

Set the value of an option within a section. Both must exist

write()[source]

Overriden method to write the configuration to Openalea's default configuration file

core.settings.get_default_home_dir()[source]

Return the home directory (valid on linux and windows)

core.settings.get_openalea_home_dir(name='.openalea')[source]

Return the openalea home dirextory If it doesn't exist, create it

core.settings.get_openalea_tmp_dir(name='.openalea')[source]

Return the openalea temporary project directory If it doesn't exist, create it

core.settings.get_project_dir(name='projects')[source]

Get default directory (the place where the projects will be created). If it doesn't exist, create it

core.settings.get_userpkg_dir(name='user_pkg')[source]

Get user package directory (the place where are the wralea.py files). If it doesn't exist, create it

Previous topic

<no title>

Next topic

<no title>

This Page