dylab/living_plot_starter.py

32 lines
575 B
Python
Raw Normal View History

2022-08-10 16:40:15 +02:00
import os
import time
import lyse
def get_pid():
with open("living_plot.ini", 'r') as pid_file:
pid_str = pid_file.readline()
return pid_str
def call_living_plot():
pid_str = get_pid()
if pid_str == "":
start_dire = r"living_plot_main.py"
os.popen("python %s" % start_dire)
def update_h5_path_file():
h5_paths = lyse.h5_paths()
with open('h5_file_path.ini', 'w') as h5_path_file:
h5_path_file.truncate(0)
s = '\n'.join(h5_paths)
h5_path_file.write(s)
update_h5_path_file()
call_living_plot()