2020
09-24
09-24
简单了解python调用其他脚本方法实例
1.用python调用python脚本#!/usr/local/bin/python3.7importtimeimportoscount=0str=('pythonb.py')result1=os.system(str)print(result1)whileTrue:count=count+1ifcount==8:print('thiscountis:',count)breakelse:time.sleep(1)print('thiscountis:',count)print('GoodBye')另外一个python脚本b.py如下:#!/usr/local/bin/python3.7print('helloworld')运行结果:[python@master2...
继续阅读 >