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


Python Properties.get方法代码示例

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


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

示例1: load_common_properties

# 需要导入模块: from java.util import Properties [as 别名]
# 或者: from java.util.Properties import get [as 别名]
def load_common_properties():
    """Loads common test properties into grinder properties."""

    current_dir = os.path.dirname(os.path.abspath(__file__))
    file_name = os.path.join(current_dir, PROPERTIES)
    source = BufferedInputStream(FileInputStream(file_name))
    props = Properties()
    props.load(source)
    source.close()

    for key in props.keySet().iterator():
        grinder.properties[key] = props.get(key)
开发者ID:italiangrid,项目名称:grinder-load-testsuite,代码行数:14,代码来源:common.py

示例2: createJMSQ

# 需要导入模块: from java.util import Properties [as 别名]
# 或者: from java.util.Properties import get [as 别名]
        cmo.setMaximumMessageSize(20)
 
##########################################
# JMS Queu configuration function 
# arguments are : JMS module, 
# Queue name, jndi name
##########################################
def createJMSQ(jms_module_name,jndi,jms_queue_name):
        jms_module_path = getJMSModulePath(jms_module_name)
        cd(jms_module_path)
        cmo.createQueue(jms_queue_name)
        cd(jms_module_path+'/Queues/'+jms_queue_name)
        cmo.setJNDIName(jndi)
        cmo.setSubDeploymentName(subdeployment_name)
 
adminUser=configProps.get("adminUser")
adminPassword=configProps.get("adminPassword")
adminURL=configProps.get("adminURL")
 
connect(adminUser,adminPassword,adminURL)
#adm_name=get('AdminServerName')
adm_name=ls('Servers',returnMap='true')[0]
print adm_name
edit()
startEdit()
 
##########################################
#   JMS CONFIGURATION## 
##########################################
total_conf=configProps.get("total_conf")
tot_djmsm=configProps.get("total_default_jms_module")
开发者ID:devwebcl,项目名称:wls_contraption,代码行数:33,代码来源:jms_module.py

示例3: Properties

# 需要导入模块: from java.util import Properties [as 别名]
# 或者: from java.util.Properties import get [as 别名]
# -*- coding: utf-8 -*-
import sys, os, re
from datetime import date
from java.util import Properties
from java.io import FileInputStream

# Load the properties file.
properties = Properties()
properties.load(FileInputStream('gradle.properties'))

# Set the basic project information.
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
开发者ID:charsyam,项目名称:armeria,代码行数:33,代码来源:conf.py

示例4: connect

# 需要导入模块: from java.util import Properties [as 别名]
# 或者: from java.util.Properties import get [as 别名]
        srvr.addTarget(getMBean("/Servers/"+target_name))
        srvr.setBytesThresholdLow(long(thrs_low))
        srvr.setBytesThresholdHigh(long(thrs_high))
        srvr.setMaximumMessageSize(long(msg_size))
 
envproperty=""
if (len(sys.argv) > 1):
    envproperty=sys.argv[1]
else:
    print "Environment Property file not specified"
    sys.exit(2)
propInputStream=FileInputStream(envproperty)
configProps=Properties()
configProps.load(propInputStream)
 
adminUser=configProps.get("adminUser")
adminPassword=configProps.get("adminPassword")
adminURL=configProps.get("adminURL")
 
connect(adminUser,adminPassword,adminURL)
 
edit()
startEdit()
 
#=============# JMS SERVER and PERSISITENT STORE CONFIGURATION #=============#
total_fstore=configProps.get("total_fstore")
#total_jstore=configProps.get("total_jstore")
total_jmssrvr=configProps.get("total_jmssrvr")
 
j=1
while (j <= int(total_jmssrvr)):
开发者ID:devwebcl,项目名称:wls_contraption,代码行数:33,代码来源:jms_servers.py


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