hublib_flag = False # join_our_list = "(Join/ask questions at https://groups.google.com/forum/#!forum/physicell-users)\n" # create the tabs, but don't display yet about_tab = AboutTab() config_tab = ConfigTab() xml_file = os.path.join('data', 'PhysiCell_settings.xml') full_xml_filename = os.path.abspath(xml_file) tree = ET.parse( full_xml_filename) # this file cannot be overwritten; part of tool distro xml_root = tree.getroot() user_tab = UserTab() svg = SVGTab() sub = SubstrateTab() nanoHUB_flag = False if ('HOME' in os.environ.keys()): nanoHUB_flag = "home/nanohub" in os.environ['HOME'] def read_config_cb(_b): # with debug_view: # print("read_config_cb", read_config.value) if read_config.value is None: #occurs when a Run just finishes and we update pulldown with the new cache dir?? # with debug_view: # print("NOTE: read_config_cb(): No read_config.value. Returning!") return
tab_layout = widgets.Layout( width='950px', # border='2px solid black', height=tab_height, overflow_y='scroll', ) # create the tabs, but don't display yet config_tab = ConfigTab() cells = CellsTab() tree = ET.parse('data/nanobio_settings.xml' ) # this file cannot be overwritten; part of tool distro xml_root = tree.getroot() nanopart = NanoTab(xml_root) svg = SVGTab() sub = SubstrateTab() mydata = DataTab() def read_config_file_cb(_b): print("read_config_file") dirname = os.path.expanduser('~/.local/share/pc4nanobio') config_file = os.path.join(dirname, read_config_file.value) fill_gui_params(config_file) def write_config_file_cb(b): # print('writing config', b) # Read in the default xml config file, just to get a valid 'root' to populate a new one
overflow_y='scroll', ) # create the tabs, but don't display yet config_tab = ConfigTab() #cells = CellsTab() user_tab = UserTab() #full_filename = os.path.abspath('../config/PhysiCell_settings.xml') full_xml_filename = os.path.abspath('myconfig.xml') #print('full_xml_filename=',full_xml_filename) tree = ET.parse( full_xml_filename) # this file cannot be overwritten; part of tool distro xml_root = tree.getroot() svg = SVGTab() sub = SubstrateTab() #nanoHUB_flag = "home/nanohub" in os.environ['HOME'] # True/False (running on nanoHUB or not) nanoHUB_flag = False def read_config_cb(_b): with debug_view: print("read_config", read_config.value) # e.g. "DEFAULT" -> read_config /Users/heiland/dev/pc4nanobio/data/nanobio_settings.xml # "<time-stamp>" -> read_config /Users/heiland/.cache/pc4nanobio/pc4nanobio/59c60c0a402e4089b71b140689075f0b # "t360.xml" -> read_config /Users/heiland/.local/share/pc4nanobio/t360.xml if read_config.value is None: #rwh: happens when a Run just finishes and we update pulldown with the new cache dir?? return
# create the tabs, but don't display yet config_tab = ConfigTab() #full_filename = os.path.abspath('data/PhysiCell_settings.xml') xml_file = os.path.join('data', 'PhysiCell_settings.xml') full_xml_filename = os.path.abspath(xml_file) nanoHUB_flag = False if ('HOME' in os.environ.keys()): nanoHUB_flag = "home/nanohub" in os.environ['HOME'] tree = ET.parse( full_xml_filename) # this file cannot be overwritten; part of tool distro xml_root = tree.getroot() user_tab = UserTab() svg = SVGTab(nanoHUB_flag) sub = SubstrateTab(nanoHUB_flag) def read_config_cb(_b): # with debug_view: # print("read_config_cb", read_config.value) if read_config.value is None: #occurs when a Run just finishes and we update pulldown with the new cache dir?? # with debug_view: # print("NOTE: read_config_cb(): No read_config.value. Returning!") return if os.path.isdir(read_config.value): is_dir = True config_file = os.path.join(read_config.value, 'config.xml')