Gnumed.pycommon.gmConfigCommon

Package Gnumed :: Package pycommon :: Module gmConfigCommon |
[frames] | no frames]

# Module gmConfigCommon

source code

GNUmed: Mid-level configuration editor object.

Theory of operation:

ConfigSourceDB/File holds config data (read from backend or file) and related config definitions. Definitions are retrieved automatically from a given config definition file (if available). See _defaultDefSourceTable below for standard file names.

First get a list of available config parameters through getAllParamNames (returns names + metadata), get the values using GetConfigData, change, check for validity using isValid (if definition data and parameter definition is available) and set data using SetConfigData. License: GNU Public License

Version: $Revision: 1.10 $

Author: H.Berger,K.Hilbert

Classes
| ConfigSource Base class for interface to access config data and definitions on a single configuration source (config file, user/workplace specific backend data collection.
| ConfigSourceDB Interface to access config data and definitions in a single configuration user/workplace specific backend data collection.
| ConfigSourceFile Interface to access config data and definitions in a config file.
| ParameterDefinition Describes a gnumed configuration parameter.
| ConfigDefinition holds config definitions read from a file/DB.
| ConfigData Base class.
| ConfigDataDB Class that holds config data for a particular user/workplace pair
| ConfigDataFile Class that holds config data for a particular config file

Functions
exportDBSet(filename, aUser=None, aWorkplace='xxxDEFAULTxxx') Fetches a backend stored set of config options (defined by user and workplace) and returns it as a plain text file. | source code
importDBSet(filename, aUser=None, aWorkplace='xxxDEFAULTxxx') get config definitions from a file exported with exportDBSet(). | source code

Imports: sys, os, string, types, pickle, gmCfg, gmPG2

Function Details

### exportDBSet(filename, aUser=None, aWorkplace='xxxDEFAULTxxx') | source code
Fetches a backend stored set of config options (defined by user and workplace) and returns it as a plain text file. NOTE: This will not write "valid value" information, since this is only hold in config definition files ! Returns: 1 for success, 0 if no parameters were found, None on failure.