本文整理汇总了Python中expr_mgmt.config_option_value函数的典型用法代码示例。如果您正苦于以下问题:Python config_option_value函数的具体用法?Python config_option_value怎么用?Python config_option_value使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了config_option_value函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: find_outfiles
def find_outfiles(options):
"""Determine output file absolut locations and return them in a list."""
if options.files == None:
outfiles = lgf.find_newest(curr_dir + "/" + expr_mgmt.config_option_value("outdir"))
else:
outfiles = lgf.find_given(options.files.split(','))
return outfiles
开发者ID:jacob2512,项目名称:plfs-regression,代码行数:7,代码来源:check_results.py
示例2: main
def main(argv=None):
if len(argv) != 2:
print "Usage:"
print "rs_exprmgmtrc_option_value.py OPTION\n"
print ("where OPTION is the value to search for in "
+ "experiment_management's rc file.\n")
return 1
value = expr_mgmt.config_option_value(str(argv[1]))
if value == None:
return 1
else:
print value
return 0
开发者ID:jacob2512,项目名称:plfs-regression,代码行数:14,代码来源:rs_exprmgmtrc_option_value.py
示例3: main
def main(argv=None):
"""Main method for running this test.
Return values:
0: Test ran
-1: Problem with opening the log file.
"""
# Where the output of the test will be placed.
out_dir = str(expr_mgmt.config_option_value("outdir")) + "/" + str(datetime.date.today())
# Create the directory if needed
if not os.path.isdir(out_dir):
os.makedirs(out_dir)
out_file = str(out_dir) + "/" + str(strftime("%H-%M-%S", localtime())) + ".log"
try:
of = open(out_file, "w")
except OSError, detail:
print("Error: unable to create log file " + str(out_file) + ": " + str(detail))
return [-1]
开发者ID:plfs,项目名称:plfs-regression,代码行数:18,代码来源:reg_test.py
示例4: append_path
def append_path(paths):
"""Append experiment_management's rs_mnt_append_path to all elements of paths.
Input:
paths: a list of paths to append to
Output:
A copy of paths that has rs_mnt_append_path appended to each element.
If rs_mnt_append_path is not defined in experiment_management's rc
file, a copy of paths is returned.
"""
# Get the optional path from experiment_management
append_path = expr_mgmt.config_option_value("rs_mnt_append_path")
ret_list = []
for path in paths:
if append_path != None:
if path[-1] != "/":
path += "/"
ret_list += [str(path) + str(append_path)]
else:
ret_list += [path]
return ret_list
开发者ID:jacob2512,项目名称:plfs-regression,代码行数:21,代码来源:rs_exprmgmtrc_target_path_append.py
示例5: str
#! /usr/bin/env python
import sys,expr_mgmt
try:
ppns = expr_mgmt.config_option_value("ppn")
except KeyError, data:
sys.stdout.write( str( data ) + ' is a nonexistent system.\n' )
else:
sys.stdout.write( 'PPN for default system is "' + str( ppns ) + '".\n' )
开发者ID:BlueLover-zm,项目名称:fs_test,代码行数:12,代码来源:exception_test.py
示例6: get_mountpoint
user = getpass.getuser()
# Add the directory that contains helper modules
utils_dir = basedir + "tests/utils"
if utils_dir not in sys.path:
sys.path += [utils_dir]
# Import the needed common modules
import rs_exprmgmt_paths_add as em_p
# Add the experiment_management locations to sys.path
em_p.add_exprmgmt_paths(basedir)
# Import expr_mgmt to aid in computing how many processes we need. We want
# at least enough to cover two nodes.
import expr_mgmt
ppn = expr_mgmt.config_option_value("ppn")
nprocs = 4
# Need the runcommand from experiment_management
runcommand = expr_mgmt.config_option_value("runcommand")
# Import the module with functions for finding mount points.
import rs_plfs_config_query
import rs_exprmgmtrc_target_path_append as tpa
def get_mountpoint():
mount_points = rs_plfs_config_query.get_mountpoints()
if len(mount_points) > 0:
mount_point = mount_points[-1]
else:
开发者ID:plfs,项目名称:plfs-regression,代码行数:31,代码来源:common.py
注:本文中的expr_mgmt.config_option_value函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论