Python_string.Template_格式化字符串
参考:https://www.cnblogs.com/testlearn/p/14813688.html
spug用法
spug_api/libs/utils.py
# 字符串模版渲染
def render_str(template, datasheet):
return Template(template).safe_substitute(datasheet)
参考:https://www.cnblogs.com/testlearn/p/14813688.html
spug用法
spug_api/libs/utils.py
# 字符串模版渲染
def render_str(template, datasheet):
return Template(template).safe_substitute(datasheet)