26 lines
519 B
Python
Executable File
26 lines
519 B
Python
Executable File
import requests
|
|
import json
|
|
|
|
|
|
url = 'http://MPC1900:8080/run'
|
|
|
|
|
|
#Text mode
|
|
#resp = requests.get(url=url+"/test5(steps_x=3, steps_y=5)&")
|
|
#if resp.status_code != 200: raise Exception(resp.text)
|
|
#print resp.text
|
|
|
|
|
|
resp = requests.put(url=url, json={"script":'test5', "pars":{"steps_x":3, "steps_y":5}, "background":True })
|
|
#resp = requests.put(url=url, json={"script":'test5', "pars":[8,10], "background":True })
|
|
if resp.status_code != 200: raise Exception(resp.text)
|
|
data = json.loads(resp.text)
|
|
print data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|