예제 #1
0
파일: pyview.py 프로젝트: jirhiker/pychron
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)
예제 #2
0
파일: pyview.py 프로젝트: sgallet/pychron
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)
예제 #3
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')
예제 #4
0
파일: helpers.py 프로젝트: NMGRL/pychron
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')
예제 #5
0
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')
예제 #6
0
파일: helpers.py 프로젝트: NMGRL/pychron
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")
예제 #7
0
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)
예제 #8
0
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)
예제 #9
0
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
예제 #10
0
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
예제 #11
0
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)
예제 #12
0
def main():
    from pychron.envisage.pychron_run import launch
    app = setup()
    launch(app)