def append_list_shared_variable(data_set):
''' Delete all shared variables - Wrapper for Clean_Up_Shared_Variables() '''
# To delete only one, use the action "save variable", and set it to an empty string
# Takes no inputs
sModuleInfo = inspect.stack()[0][3] + " : " + inspect.getmoduleinfo(__file__).name
CommonUtil.ExecLog(sModuleInfo,"Function Start", 0)
try:
# Parse data set
tmp = data_set[0][2].replace(' ', '').strip() # Get key and value from Value field and clean them
shared_var = tmp.split('=')[0].strip() # Get variable name
tmp = tmp.replace(shared_var, '').strip().replace('=', '', 1)
values = tmp.split(',') # Get values (could be several)
# Append all values
for value in values:
result = sr.Append_List_Shared_Variables(shared_var, value.strip())
return result
except Exception:
return CommonUtil.Exception_Handler(sys.exc_info())
common_functions.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录