本文整理汇总了Python中configuration.Configuration.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Configuration.__init__方法的具体用法?Python Configuration.__init__怎么用?Python Configuration.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类configuration.Configuration
的用法示例。
在下文中一共展示了Configuration.__init__方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from configuration import Configuration [as 别名]
# 或者: from configuration.Configuration import __init__ [as 别名]
def __init__(self, config_file_name="config.xml"):
"""Constructor that calls constructor of super class Configuration and
forms path to game_settings
Keyword arguments:
config_file_name -- the name of the XML configuration file (default
config.xml)
"""
Configuration.__init__(self, config_file_name)
# definition of the path for the game_settings configuration file
self.path_game_settings = Configuration.get_base_path(self) + "game_settings.xml"
示例2: __init__
# 需要导入模块: from configuration import Configuration [as 别名]
# 或者: from configuration.Configuration import __init__ [as 别名]
def __init__(self, **kwargs):
self.remote = False
# add preferences to the configuration
# TODO: do at class level
self.options.append(('preferences', {'help': 'browser preferences',
'default': self.preferences,
'flags': []}))
# set arguments to dump to a configuration file
kwargs.setdefault('dump', ['-o', '--output'])
# set usage argument
kwargs.setdefault('usage', '%prog [options] manifest.yml [manifest.yml] [...]')
# TODO: something about deviceroot:
# http://hg.mozilla.org/build/talos/file/c702ff8892be/talos/PerfConfigurator.py#l44
# call parent constructor
Configuration.__init__(self, **kwargs)
示例3: __init__
# 需要导入模块: from configuration import Configuration [as 别名]
# 或者: from configuration.Configuration import __init__ [as 别名]
def __init__(self, context):
Configuration.__init__(self, context)
示例4: __init__
# 需要导入模块: from configuration import Configuration [as 别名]
# 或者: from configuration.Configuration import __init__ [as 别名]
def __init__(self, config, section):
Configuration.__init__(self)
for (name, value) in config.sections[section]:
# print "reading %s" % name
(values, default) = parse(value)
self += Parameter(name, values, default)