def dialog_ana_menu(): d = Dialog(dialog="dialog") d.set_background_title("analysis macros") gas_options = conf.get_gas_options() choices = [] for entry in conf.list_dir("./ana", ext=".sh"): choices += [(entry, "")] for entry in conf.list_dir("./ana", ext=".py"): choices += [(entry, "")] if len(choices): code, tag = d.menu("select macro to run", choices=choices) return (code, tag)
def dialog_field_checklist(): d = Dialog(dialog="dialog") d.set_background_title("FIELD section options") field_options = conf.get_field_options() choices = [] for entry in conf.list_dir("./field", ext=".txt"): choices += [(entry, "", (entry in field_options))] for entry in conf.list_dir("./field", ext=".sh"): choices += [(entry, "", (entry in field_options))] if len(choices): code, selection = d.checklist("select FIELD options", choices=choices) if code == d.OK: conf.set_field_options(selection) else: d.infobox("no option files in ./field", width=0, height=0, title="done") time.sleep(2)
def dialog_cell_list(): d = Dialog(dialog="dialog") d.set_background_title("select a cell") choices = [] for entry in conf.list_dir("./cells", ext=".json"): choices += [(entry, "", False)] if len(choices): return d.radiolist("select a cell:", choices=choices) else: d.infobox("no option files in ./cells", width=0, height=0, title="done") time.sleep(2) return "none"
def dialog_gas_checklist(): d = Dialog(dialog="dialog") d.set_background_title("GAS section options") gas_options = conf.get_gas_options() choices = [] for entry in conf.list_dir("./gas", ext=".txt"): choices += [(entry, "", (entry in gas_options))] #for entry in conf.list_dir("./gas",ext=".sh"): #choices+= [(entry,"",(entry in gas_options))] if len(choices): code, selection = d.radiolist("select GAS options", choices=choices) if code == d.OK: conf.set_gas_options(selection) else: d.infobox("no option files in ./gas", width=0, height=0, title="done") time.sleep(2)
def dialog_asc_menu(): d = Dialog(dialog="dialog") d.set_background_title("circuit models") gas_options = conf.get_gas_options() choices = [] for entry in conf.list_dir("./spice", ext=".asc"): choices += [(entry, "")] if len(choices): code, tag = d.menu("select SPICE circuit model to edit", choices=choices) return (code, tag) else: d.infobox("no option files in ./spice", width=0, height=0, title="done") time.sleep(2)
def dialog_fee_spice_conf(): d = Dialog(dialog="dialog") d.set_background_title("Select spice model conf file") fee_spice_conf = conf.get_fee_spice_conf() choices = [] for entry in conf.list_dir("./spice", ext=".fee.json"): choices += [(entry, "", (entry == fee_spice_conf))] if len(choices): code, selection = d.radiolist("select cell spice configuration file", choices=choices) if code == d.OK: conf.set_fee_spice_conf(selection) else: d.infobox("no option files in ./spice", width=0, height=0, title="done") time.sleep(2)