Public Member Functions | |
| def | __init__ |
| The Constructor. | |
| def | section_exists |
| Tests whether a section exists or not. | |
| def | option_exists |
| Tests whether an option exists or not. | |
| def | set_value |
| Set a option's value and write it to pyjama.cfg. | |
| def | get_value |
| Reads a value from an option. | |
| def | remove_option |
| Removes an option from pyjama.cfg. | |
| def | write_config |
| Writes pyjama.cfg to disc In most cases this is done by set_value automatically. | |
| def | isbool |
| Tests if a string contains a boolean. | |
| def | parsebool |
| Return the boolean value a string contains. | |
Public Attributes | |
| parent | |
| Pointer to Pyjama. | |
| home_config | |
| stores the config file URI | |
| config | |
| Parser Object Pointer. | |
| options | |
| List holding options from pyjama.cfg. | |
Definition at line 29 of file clSettings.py.
| def modules::clSettings::settings::__init__ | ( | self, | ||
parent = None | ||||
| ) |
The Constructor.
| self | The Object pointer | |
| parent | Pyjama Object Pointer |
Definition at line 33 of file clSettings.py.
| def modules::clSettings::settings::get_value | ( | self, | ||
| section, | ||||
| option, | ||||
default = None, |
||||
func = None | ||||
| ) |
Reads a value from an option.
| self | The Object pointer | |
| section | A section as string | |
| option | An option as string | |
| default | A default value | |
| func | A function to run over the value read out - think of float conversions etc. |
Definition at line 107 of file clSettings.py.
| def modules::clSettings::settings::isbool | ( | self, | ||
| string | ||||
| ) |
Tests if a string contains a boolean.
| self | The Object pointer | |
| string | The strint to test |
Definition at line 176 of file clSettings.py.
| def modules::clSettings::settings::option_exists | ( | self, | ||
| section, | ||||
| option | ||||
| ) |
Tests whether an option exists or not.
| self | The Object pointer | |
| self | The Object Pointer | |
| section | The section in which the option should be found as string | |
| option | The option to test for as string |
Definition at line 79 of file clSettings.py.
| def modules::clSettings::settings::parsebool | ( | self, | ||
| string | ||||
| ) |
Return the boolean value a string contains.
| self | The Object pointer |
Definition at line 184 of file clSettings.py.
| def modules::clSettings::settings::remove_option | ( | self, | ||
| section, | ||||
| option | ||||
| ) |
Removes an option from pyjama.cfg.
| self | The Object pointer | |
| section | The option's section | |
| option | The option to delete |
Definition at line 146 of file clSettings.py.
| def modules::clSettings::settings::section_exists | ( | self, | ||
| section | ||||
| ) |
Tests whether a section exists or not.
| self | The Object pointer | |
| self | The Object pointer | |
| section | A string |
Definition at line 70 of file clSettings.py.
| def modules::clSettings::settings::set_value | ( | self, | ||
| section, | ||||
| option, | ||||
| value, | ||||
func = None | ||||
| ) |
Set a option's value and write it to pyjama.cfg.
| self | The Object pointer | |
| section | The section as string | |
| option | The option as string | |
| value | The value to set as string | |
| func | A function to run over the value before it is written to config |
Definition at line 90 of file clSettings.py.
| def modules::clSettings::settings::write_config | ( | self | ) |
Writes pyjama.cfg to disc In most cases this is done by set_value automatically.
| self | The Object pointer |
Definition at line 155 of file clSettings.py.
1.5.8