当前位置: 首页>>代码示例>>Python>>正文


Python Properties.entrySet方法代码示例

本文整理汇总了Python中java.util.Properties.entrySet方法的典型用法代码示例。如果您正苦于以下问题:Python Properties.entrySet方法的具体用法?Python Properties.entrySet怎么用?Python Properties.entrySet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.util.Properties的用法示例。


在下文中一共展示了Properties.entrySet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: loadProperties

# 需要导入模块: from java.util import Properties [as 别名]
# 或者: from java.util.Properties import entrySet [as 别名]
def loadProperties(fileName):
	properties = Properties()
	input = FileInputStream(fileName)
	properties.load(input)
	input.close()
	result= {}
	for entry in properties.entrySet(): result[entry.key] = entry.value
	return result
开发者ID:osanchezhuerta,项目名称:weblogicjmsclustered-module,代码行数:10,代码来源:weblogicjms-cluster.py

示例2: str

# 需要导入模块: from java.util import Properties [as 别名]
# 或者: from java.util.Properties import entrySet [as 别名]
project = 'Armeria'
project_short = 'Armeria'
copyright = properties.get('inceptionYear') + '-' + str(date.today().year) + ', LINE Corporation'

# Set the project version and release.
# Use the last known stable release if the current version ends with '-SNAPSHOT'.
if re.match(r'^.*-SNAPSHOT$', properties.get('version')):
    release = '0.32.0'
else:
    release = properties.get('version')
version = re.match(r'^[0-9]+\.[0-9]+', release).group(0)

# Export the loaded properties and some useful values into epilogs
rst_epilog = '\n'
rst_epilog += '.. |baseurl| replace:: http://line.github.io/armeria/\n'
propIter = properties.entrySet().iterator()
while propIter.hasNext():
    propEntry = propIter.next()
    if propEntry.getKey() in [ 'release', 'version' ]:
        continue
    rst_epilog += '.. |' + propEntry.getKey() + '| replace:: ' + propEntry.getValue() + '\n'
rst_epilog += '\n'

needs_sphinx = '1.0'
extensions = ['sphinx.ext.autodoc']
templates_path = ['_templates']
source_suffix = '.rst'
source_encoding = 'utf-8-sig'
master_doc = 'index'
exclude_trees = ['.build']
add_function_parentheses = True
开发者ID:charsyam,项目名称:armeria,代码行数:33,代码来源:conf.py


注:本文中的java.util.Properties.entrySet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。