def run_gui(): from Gnumed.wxpython import gmGuiMain profile_file = _cfg.get(option='--profile', source_order=[('cli', 'return')]) if profile_file is None: gmGuiMain.main() else: _log.info('writing profiling data into %s', profile_file) import profile profile.run('gmGuiMain.main()', profile_file) return 0
def run_gui(): gmHooks.run_hook_script(hook='startup-before-GUI') from Gnumed.wxpython import gmGuiMain profile_file = _cfg.get(option='--profile', source_order=[('cli', 'return')]) if profile_file is None: gmGuiMain.main() else: _log.info('writing profiling data into %s', profile_file) import profile profile.run('gmGuiMain.main()', profile_file) gmHooks.run_hook_script(hook='shutdown-post-GUI') return 0
def run_gui(): gmHooks.run_hook_script(hook = 'startup-before-GUI') if ui_type == 'wxp': from Gnumed.wxpython import gmGuiMain profile_file = _cfg.get(option = '--profile', source_order = [('cli', 'return')]) if profile_file is not None: _log.info('writing profiling data into %s', profile_file) import profile profile.run('gmGuiMain.main()', profile_file) else: gmGuiMain.main() #elif ui_type == u'web': # from Gnumed.proxiedpyjamas import gmWebGuiServer # gmWebGuiServer.main() #elif ui_type == u'chweb': # from Gnumed.CherryPy import gmGuiWeb # gmGuiWeb.main() gmHooks.run_hook_script(hook = 'shutdown-post-GUI') return 0
gmPG2.auto_request_login_params = False setup_backend() from Gnumed.pycommon import gmHooks gmHooks.run_hook_script(hook = u'startup-before-GUI') if ui_type == u'wxp': from Gnumed.wxpython import gmGuiMain profile_file = _cfg.get(option = u'--profile', source_order = [(u'cli', u'return')]) if profile_file is not None: _log.info('writing profiling data into %s', profile_file) import profile profile.run('gmGuiMain.main()', profile_file) else: gmGuiMain.main() #elif ui_type == u'web': # from Gnumed.proxiedpyjamas import gmWebGuiServer # gmWebGuiServer.main() #elif ui_type == u'chweb': # from Gnumed.CherryPy import gmGuiWeb # gmGuiWeb.main() gmHooks.run_hook_script(hook = u'shutdown-post-GUI') shutdown_backend() shutdown_tmp_dir() _log.info('Normally shutting down as main module.') shutdown_logging()