minor syntax beauty changes
This commit is contained in:
@ -48,7 +48,7 @@ class Utilities:
|
||||
|
||||
def __init__(self):
|
||||
print("init phoenix.Utilities")
|
||||
pass
|
||||
|
||||
# setattr(self, "description", description)
|
||||
# atribute 'label' for compatibility woith La groups...
|
||||
# setattr(self, "label", description)
|
||||
@ -75,7 +75,7 @@ class Utilities:
|
||||
name = cls.name
|
||||
n_name = len(name)
|
||||
except:
|
||||
Name = " "
|
||||
name = " "
|
||||
try:
|
||||
config = cls._info["describe"]
|
||||
except:
|
||||
@ -95,6 +95,9 @@ class Utilities:
|
||||
print("no key")
|
||||
|
||||
def list_signals_falcon(self):
|
||||
"""
|
||||
List signals for falcon
|
||||
"""
|
||||
|
||||
print("........... dev.falcon ")
|
||||
self.list_signals_(dev.falcon)
|
||||
@ -106,6 +109,9 @@ class Utilities:
|
||||
self.list_signals_(dev.falcon.roi0)
|
||||
|
||||
def list_signals_xmap(self):
|
||||
"""
|
||||
List signals for XMAP
|
||||
"""
|
||||
|
||||
print("........... dev.xmap ")
|
||||
self.list_signals_(dev.xmap)
|
||||
@ -171,12 +177,17 @@ class PhoenixBL(Utilities, PhoenixHelp):
|
||||
# bec.config.update_session_with_file(self.file_devices_file_local)
|
||||
|
||||
def create_base_config(self):
|
||||
# create a yaml file from standard configuration
|
||||
""" "
|
||||
create a yaml file from standard configuration
|
||||
"""
|
||||
os.system("cat " + self.file_devices_file + " > " + self.file_devices_tmp)
|
||||
# os.system("ls -altr" + self.path_phoenix_bec + "phoenix_bec/devices")
|
||||
bec.config.update_session_with_file(self.file_devices_tmp)
|
||||
|
||||
def add_phoenix_config(self):
|
||||
"""
|
||||
Add phoenix config
|
||||
"""
|
||||
print("add_phoenix_config ")
|
||||
print("self.file_devices_file")
|
||||
os.system("cat " + self.file_devices_file + " >> " + self.file_devices_tmp)
|
||||
@ -184,24 +195,28 @@ class PhoenixBL(Utilities, PhoenixHelp):
|
||||
bec.config.update_session_with_file(self.file_devices_tmp)
|
||||
|
||||
def add_xmap(self):
|
||||
"""Add XMAP to config"""
|
||||
print("add xmap ")
|
||||
|
||||
os.system("cat " + self.file_devices_xmap + " >> " + self.file_devices_tmp)
|
||||
bec.config.update_session_with_file(self.file_devices_tmp)
|
||||
|
||||
def load_xmap(self):
|
||||
"""Load XMAP"""
|
||||
print("load_xmap")
|
||||
os.system("cat " + self.file_devices_xmap + " > " + self.file_devices_tmp)
|
||||
|
||||
bec.config.update_session_with_file(self.file_devices_xmap)
|
||||
|
||||
def add_falcon(self):
|
||||
"""Add Falcon to config"""
|
||||
print("add_falcon to existing configuration ")
|
||||
|
||||
os.system("cat " + self.file_devices_falcon + " >> " + self.file_devices_tmp)
|
||||
bec.config.update_session_with_file(self.file_devices_tmp)
|
||||
|
||||
def load_falcon(self):
|
||||
"""Load FALCON"""
|
||||
|
||||
print("load_falcon")
|
||||
os.system("cat " + self.file_devices_falcon + " > " + self.file_devices_tmp)
|
||||
@ -212,7 +227,14 @@ class PhoenixBL(Utilities, PhoenixHelp):
|
||||
# os.system("cat " + self.path_phoenix_bec + "phoenix_bec/scripts/Current_setup.txt")
|
||||
|
||||
def run_shell(self, commands):
|
||||
"""
|
||||
run one or sever shell comands in a new terminal
|
||||
|
||||
Example:
|
||||
|
||||
run_shell('ls')
|
||||
runt_shell(['sh script.sh','pwd','ls'])
|
||||
"""
|
||||
cmd = 'gnome-terminal --geometry 100X30 -- bash -c "'
|
||||
print(cmd)
|
||||
if type(commands) == list:
|
||||
|
Reference in New Issue
Block a user