首页后端开发Pythonshell脚本中怎么调用python脚本中的带参函数

shell脚本中怎么调用python脚本中的带参函数

时间2023-06-02 20:51:01发布访客分类Python浏览1030
导读:shell脚本中怎么调用python脚本中的带参函数?# python脚本 test.py # coding: utf-8 import sys def print_data(a, b, c : print a, b, c if __nam...

shell脚本中怎么调用python脚本中的带参函数?

# python脚本 test.py # coding: utf-8 import sys def print_data(a, b, c): print a, b, c if __name__ == "__main__": print_data(sys.argv[1], sys.argv[2], sys.argv[3]) # shell 脚本 python test.py a b c # 结束 a b c

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!


若转载请注明出处: shell脚本中怎么调用python脚本中的带参函数
本文地址: https://pptw.com/jishu/58706.html
为何Go没有Python流行 你的系统是怎么程序化的

游客 回复需填写必要信息