Script execution

This commit is contained in:
gac-x03da
2018-10-13 13:31:26 +02:00
parent afe2bb0e51
commit 25bc367ee9

View File

@@ -1,12 +1,16 @@
"""
2018-10-13
author: christoph Seitz
measurement = ""
"""
path = "/sls/X03DA/data/gac-x03da/Data1/2018/10/Granas/XPSstuff/commands/set_measure.txt"
command_path_tmp = "/sls/X03DA/data/gac-x03da/Data1/2018/10/Granas/XPSstuff/commands/set_measure.txt"
for i in range(60):
time.sleep(4)
if os.path.exits(path):
cont = open(path).read()
if os.path.exits(command_path_tmp):
cont = open(command_path_tmp).read() #reading command from file
if "manipulator spectrum O1s" in cont:
select_edge_tmp = "O1s "
execfile("/sls/X03DA/data/gac-x03da/pshell/home/script/users/Granas/ManipulatorScan.py")
@@ -22,3 +26,14 @@ for i in range(60):
if "exit_loop":
break
#printing the end to file
for i in range(3):
try:
print("loop is closed now")
open(path,'w').write("loop is closed now")
break
except:
print("ending loop failed")
print("trying again")