12 lines
571 B
Python
12 lines
571 B
Python
def save_snapshot(camera_name = "SLG-LCAM-C041_sp", shared = False ): #, logbook = "SwissFEL commissioning data", comment = ""):
|
|
import requests
|
|
base = "http://sf-daq-mgmt:8090/"
|
|
#url = base + "run/Tools/save_snapshot(%s,%s,%s,%s)" % (camera_name, str(shared), logbook, "'" + str(comment) + "'")
|
|
url = base + "run/Tools/save_snapshot(%s,%s)" % (camera_name, str(shared))
|
|
r = requests.get(url)
|
|
if r.status_code != 200:
|
|
raise Exception(r.text)
|
|
#print "Ret: ", r.text
|
|
return json.loads(r.text.replace("'", '"') .replace('u"', '"'))
|
|
|