def main(): ''' entry point ''' from pychron.envisage.pychron_run import launch from pychron.core.helpers.logger_setup import logging_setup from pychron.paths import build_directories, paths # import application # from pychron.applications.pyexperiment import PyExperiment as app from pychron.applications.pyview import PyView as app # build directories build_directories(paths) # from pychron.core.helpers.paths import hidden_dir # path = os.path.join(hidden_dir, 'version_info') # a = VersionInfoDisplay(local_path=path, # src_path=os.path.join(SRC_DIR, # 'version_info.txt')) # a.check() logging_setup('pychron', level='DEBUG') #=============================================================================== # test flag # set if you want to execute tests after startup # explicitly set the flag here once. mode is a readonly property #=============================================================================== from pychron.globals import globalv globalv._test = False globalv.debug = DEBUG launch(app) os._exit(0)
def entry_point(appname, debug=False): """ entry point """ klass = KLASS_MAP.get(appname) monkey_patch_preferences() monkey_patch_checkbox_render() monkey_patch_panel() # set_stylesheet('darkorange.css') env = initialize_version(appname, debug) if env: # set_stylesheet(None) if debug: set_commandline_args() # import app klass and pass to launch function if check_dependencies(debug): mod = __import__('pychron.applications.{}'.format(appname), fromlist=[klass]) app = getattr(mod, klass) from pychron.envisage.pychron_run import launch launch(app) else: logger.critical('Failed to initialize environment')
def entry_point(modname, klass, setup_version_id='', debug=False): """ entry point """ user = initialize_version(modname, debug) if user: if debug: set_commandline_args() # import app klass and pass to launch function if check_dependencies(debug): mod = __import__('pychron.applications.{}'.format(modname), fromlist=[klass]) app = getattr(mod, klass) from pychron.envisage.pychron_run import launch launch(app, user) else: logger.critical('Failed to initialize user')
def entry_point(modname, klass, setup_version_id="", debug=False): """ entry point """ user = initialize_version(modname, debug) if user: if debug: set_commandline_args() # import app klass and pass to launch function if check_dependencies(debug): mod = __import__("pychron.applications.{}".format(modname), fromlist=[klass]) app = getattr(mod, klass) from pychron.envisage.pychron_run import launch launch(app, user) else: logger.critical("Failed to initialize user")
def main(): """ entry point """ from pychron.envisage.pychron_run import launch from pychron.core.helpers.logger_setup import logging_setup from pychron.paths import build_directories, paths # build directories build_directories(paths) # from pychron.core.helpers.paths import hidden_dir # path = os.path.join(hidden_dir, 'version_info') # a = VersionInfoDisplay(local_path=path, # src_path=os.path.join(SRC_DIR, # 'version_info.txt')) # a.check() logging_setup('pychron', level='DEBUG') from pychron.applications.pyexperiment import PyExperiment as app launch(app)
def main(): """ entry point """ from pychron.envisage.pychron_run import launch from pychron.core.helpers.logger_setup import logging_setup from pychron.paths import build_directories, paths # import application from pychron.applications.pyexperiment import PyExperiment as app # from pychron.applications.pyvalve import PyValve as app # build directories build_directories(paths) # from pychron.core.helpers.paths import hidden_dir # path = os.path.join(hidden_dir, 'version_info') # a = VersionInfoDisplay(local_path=path, # src_path=os.path.join(SRC_DIR, # 'version_info.txt')) # a.check() logging_setup('pychron', level='DEBUG') # #=============================================================================== # # test flag # # set if you want to execute tests after startup # # explicitly set the flag here once. mode is a readonly property # #=============================================================================== # from pychron.globals import globalv # globalv._test = False # globalv.debug = DEBUG # from guppy import hpy # app.hp = hp = hpy() try: launch(app) except RuntimeError: pass
def entry_point(modname, klass, setup_version_id='', debug=False): """ entry point """ from traits.etsconfig.api import ETSConfig ETSConfig.toolkit = "qt4" # build_version('', setup_version_id, debug=debug) user = initialize_version(modname, debug) # from pychron.core.helpers.logger_setup import logging_setup # from pychron.paths import build_directories # # # build directories # build_directories() # # # setup logging. set a basename for log files and logging level # logging_setup('pychron', level='DEBUG') #import app klass and pass to launch function mod = __import__('pychron.applications.{}'.format(modname), fromlist=[klass]) from pychron.envisage.pychron_run import launch launch(getattr(mod, klass), user)
def main(): from pychron.envisage.pychron_run import launch app = setup() launch(app)