Python template:修订间差异
跳到导航
跳到搜索
(创建页面,内容为“ #!/usr/bin/python3 # -*- coding: utf-8 -*- # import upy HELP = ------------------------------------------------------------------------------ Name : pangoin - INF Purpose : ETL Author : Adam Revisions: Ver Date Author Description --------- ---------- --------------- ------------------------------------ 1.0 2020/11/15 Adam Create format: app = pet/pet2/pup/pup2 ---------…”) |
无编辑摘要 |
||
(未显示同一用户的2个中间版本) | |||
第1行: | 第1行: | ||
Python Template Sample | |||
==== Python Template ==== | |||
#!/usr/bin/python3 | #!/usr/bin/python3 | ||
# -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||
第23行: | 第26行: | ||
import usys | import usys | ||
d_val = {'type':'pangolin'} | d_val = {'type':'pangolin', 'app':'pet', 'time_b':None, 'time_e':None, 'secs':0, 'result':0, 'message':None, 'memo':None} | ||
# get dict from command parameter | # get dict from command parameter | ||
第40行: | 第43行: | ||
print(d_res) | print(d_res) | ||
rs = ucgi.ulog(d_res) | rs = ucgi.ulog(d_res) | ||
[[分类:Develop]] | |||
[[分类:Python]] |
2023年12月29日 (五) 13:27的最新版本
Python Template Sample
Python Template
#!/usr/bin/python3 # -*- coding: utf-8 -*- # import upy HELP = ------------------------------------------------------------------------------ Name : pangoin - INF Purpose : ETL Author : Adam Revisions: Ver Date Author Description --------- ---------- --------------- ------------------------------------ 1.0 2020/11/15 Adam Create format: app = pet/pet2/pup/pup2 ------------------------------------------------------------------------------ def pangoin(d_in): import sys import usys d_val = {'type':'pangolin', 'app':'pet', 'time_b':None, 'time_e':None, 'secs':0, 'result':0, 'message':None, 'memo':None} # get dict from command parameter d_cp_tmp = usys.cp(1, HELP) s_tmp = d_cp_info.get('app', ).lower() if not s_tmp: print(HELP) sys.exit(1) return d_val if __name__ == "__main__": d_res = pangoin() print(d_res) rs = ucgi.ulog(d_res)