Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

        def merge_config(user_config_file):
    settings.merge(ConfigObj(user_config_file))
    results = settings.validate(validator)
    if results != True:
        for (section_list, key, _) in flatten_errors(settings, results):
            if key is not None:
                print "Error loading configuration file:"
                print 'Invalid key "%s" in section "%s"' % (key, ', '.join(section_list))
                sys.exit(0)
            else:
# ignore missing sections - use defaults
                #print 'The following section was missing:%s ' % ', '.join(section_list)
                pass
        


src/a/n/ank_le-HEAD/AutoNetkit/deploy/tests/test_olive.py   ank_le(Download)
    master_dir = (resource_filename(__name__, ""))
    config_file = os.path.join(master_dir, "olive.cfg")
    config.merge_config(config_file)
    print config.settings
 

src/a/n/ank_le-HEAD/AutoNetkit/deploy/tests/test_netkit.py   ank_le(Download)
    master_dir = (resource_filename(__name__, ""))
    config_file = os.path.join(master_dir, "netkit.cfg")
    config.merge_config(config_file)
 
    inet = AutoNetkit.internet.Internet("2routers", netkit=True, deploy=True) 

src/a/n/ank_le-HEAD/AutoNetkit/deploy/tests/test_dynagen.py   ank_le(Download)
    master_dir = (resource_filename(__name__, ""))
    config_file = os.path.join(master_dir, "dynagen.cfg")
    config.merge_config(config_file)
 
    inet = AutoNetkit.internet.Internet("2routers", netkit=True, deploy=True)