_convertConfigLinesToArguments(parser,
lines)
| source code
|
Converts configuration file lines of the format:
myoption 1
mybooloption False
to the equivalent command-line arguments for the specified OptionParser.
For example, the configuration file above would return the argument
list ['--myoption', '1', '--mybooloption'] if mybooloption has action
store_false, and ['--myoption', '1'] if mybooloption has action store_true.
@parameter parser: OptionParser object containing configuration options.
@type parser: OptionParser
@parameter lines: List of dictionary object parsed from a configuration file.
Each option is expected to have 'type', 'key', 'value' entries.
@type lines: list of dictionaries.
@return: List of command-line arguments corresponding to the configuration file.
@rtype: list of strings
|