记录一下TD如何调用exe和下载文件
import os
def onValueChange(channel, sampleIndex, val, prev):
if channel >= 1:
os.system('start "" /d "D:\work\PlayControl\PlayControlMain\Build" /wait "PlayControlMain.exe"')
return
import requests
def onValueChange(channel, sampleIndex, val, prev):
if channel >= 1:
url = 'https://ferris-wheel.oss-cn-beijing.aliyuncs.com//df94fcc32418a.mp4'
myfile = requests.get(url)
open('D:/work/PlayControlVideo/test1.mp4','wb').write(myfile.content)
return