| Trees | Indices | Help |
|---|
|
|
object --+
|
Settings
An object that represents a settings file, its sectons, and the options defined within those sections.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
sections Returns a list of existing sections |
|||
| system_path | |||
| user_path | |||
| settings_path | |||
|
Inherited from |
|||
|
|||
initializes a new settings object. If no paths are given, they are
guessed based on whatever platform the script was run on.
Examples:
paths = ['/etc/parpg', '/home/user_name/.config/parpg']
settings = Settings(*paths)
paths = {'system': '/etc/parpg',
'user': '/home/user_name/.config/parpg'}
settings = Settings(**paths)
settings = Settings('.')
settigns = Settings()
@param system_path: Path to the system settings file.
@type system_path: string (must be a valid path)
@param user_path: Path to the user settings file. Options that
are missing from this file are propogated
from the system settings file and saved on
request
@type user_path: string (must be a valid path)
@param suffix: Suffix of the settings file that will be generated.
@type suffix: string
|
Returns a Section object to be used for assignment, creating one if it doesn't exist.
|
Reads a settings file and populates the settings object with its sections and options. Calling this method without any arguments simply re-reads the previously defined filename and paths
|
Writes a settings file based on the settings object's sections and options
|
|
|||
sectionsReturns a list of existing sections
|
system_path
|
user_path
|
settings_path
|
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Mon Aug 15 17:19:44 2011 | http://epydoc.sourceforge.net |