# 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
) # 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
# 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() # microenv_tab = MicroenvTab() user_tab = UserTab() # svg = SVGTab() sub = SubstrateTab() nanoHUB_flag = False if( 'HOME' in os.environ.keys() ): nanoHUB_flag = "home/nanohub" in os.environ['HOME'] # callback when user selects a cached run in the 'Load Config' dropdown widget. # HOWEVER, beware if/when this is called after a sim finishes and the Load Config dropdown widget reverts to 'DEFAULT'. # In that case, we don't want to recompute substrate.py self.numx, self.numy because we're still displaying plots from previous sim. def read_config_cb(_b): # with debug_view: # print("read_config_cb", read_config.value) sub.first_time = True
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() microenv_tab = MicroenvTab() user_tab = UserTab() if xml_root.find('.//cell_definitions'): cell_types_tab = CellTypesTab() # svg = SVGTab() sub = SubstrateTab() animate_tab = AnimateTab() nanoHUB_flag = False if ('HOME' in os.environ.keys()): nanoHUB_flag = "home/nanohub" in os.environ['HOME'] # callback when user selects a cached run in the 'Load Config' dropdown widget. # HOWEVER, beware if/when this is called after a sim finishes and the Load Config dropdown widget reverts to 'DEFAULT'. # In that case, we don't want to recompute substrate.py self.numx, self.numy because we're still displaying plots from previous sim. def read_config_cb(_b): # with debug_view: # print("read_config_cb", read_config.value) sub.first_time = True
# 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() microenv_tab = MicroenvTab() 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
# 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() microenv_tab = MicroenvTab() cell_tab = CellDefTab() user_tab = UserTab() # svg = SVGTab() sub = SubstrateTab() nanoHUB_flag = False if ('HOME' in os.environ.keys()): nanoHUB_flag = "home/nanohub" in os.environ['HOME'] # callback when user selects a cached run in the 'Load Config' dropdown widget. # HOWEVER, beware if/when this is called after a sim finishes and the Load Config dropdown widget reverts to 'DEFAULT'. # In that case, we don't want to recompute substrate.py self.numx, self.numy because we're still displaying plots from previous sim. def read_config_cb(_b): # with debug_view: # print("read_config_cb", read_config.value) sub.first_time = True
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') else:
# 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() microenv_tab = MicroenvTab() 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) sub.first_time = True 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!")