Did I find the right examples for you? yes no

All Samples(12)  |  Call(10)  |  Derive(0)  |  Import(2)
Lookup values of configurations by a dotted name 

src/h/a/haufe.hrs.configuration-0.5.18/haufe/hrs/configuration/demo.py   haufe.hrs.configuration(Download)
 
if __name__ == '__main__':
    from haufe.hrs.configuration import generateParser, OptionLookup
 
    import logging
    pprint(opts.__dict__)
 
    OL = OptionLookup(opts, 'cms')
    print OL.get('adb2version')
    print OL.has('foobar')
 
    OL = OptionLookup(opts)

src/h/a/haufe.hrs.configuration-0.5.18/haufe/hrs/configuration/tests/test_configuration.py   haufe.hrs.configuration(Download)
import unittest
from unittest import TestCase, TestSuite, makeSuite
from haufe.hrs.configuration import generateParser, OptionLookup
from haufe.hrs.configuration import util
 
    def testOptionLookupWithDefaults(self):
        parser = self._generateParser('model') 
        parser.add_file(os.path.join(dirname, 'empty-config.ini'))
        opts = parser.parse()
        OL = OptionLookup(opts)
    def testOptionLookupWithConfigurationFile(self):
        parser = self._generateParser('model') 
        parser.add_file(os.path.join(dirname, 'example-config.ini'))
        opts = parser.parse()
        OL = OptionLookup(opts)
    def testOptionLookupWithConfigurationFileWithDomain(self):
        parser = self._generateParser('model') 
        parser.add_file(os.path.join(dirname, 'example-config.ini'))
        opts = parser.parse()
        OL = OptionLookup(opts, 'cms')
    def testOptionLookupWithConfigurationFileWithDomainAndFullName(self):
        parser = self._generateParser('model') 
        parser.add_file(os.path.join(dirname, 'example-config.ini'))
        opts = parser.parse()
        OL = OptionLookup(opts, 'cms')