--- gnumed.py.orig 2010-02-18 16:12:20.000000000 +0100 +++ gnumed.py 2010-03-15 11:56:15.000000000 +0100 @@ -100,7 +100,8 @@ u'local-import', u'help', u'version', - u'hipaa' + u'hipaa', + u'gui=' ] import_error_sermon = """ @@ -490,14 +491,20 @@ gmHooks.run_hook_script(hook = u'startup-before-GUI') -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) +if _cfg.get(option = u'--gui', source_order = [(u'cli', u'return')]) == 'web': + from Gnumed.wxpython import gmGuiWeb + gmGuiWeb.main() + else: - gmGuiMain.main() + 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() + gmHooks.run_hook_script(hook = u'shutdown-post-GUI')