Beispiel #1
0
def _check_first_start():
    # is_started_from_cmdline() == True iff invoked via emzed.workbench command line command
    # in this case nothing should happen, because we want this actions
    # later in spyders ipython console where is_started_from_cmdline() is False.
    from _tools import (runs_inside_emzed_console, runs_inside_emzed_workbench, gui_running,
                        is_first_start)
    if is_first_start() and runs_inside_emzed_console():
        global_config.set_defaults()
        print
        print "loading emzed.config ".ljust(80, ".")
        print
        print "This is the first time you use emzed. Configuration values are set to their"
        print "default values. You can use "
        print
        print "     emzed.config.edit()"
        print
        print "to inspect and modify these."
        print
        print "".ljust(80, ".")
        store()
    elif is_first_start() and runs_inside_emzed_workbench():
        if gui_running():
            aborted = edit(reset_to_defaults=True)
            if not aborted:
                store()
            load()
        else:
            global_config.set_defaults()
            print
            print "loading emzed.config ".ljust(80, ".")
            print
            print "This is the first time you use emzed. Configuration values are set to their"
            print "default values. You can use "
            print
            print "     emzed.config.edit()"
            print
            print "to inspect and modify these."
            print
            print "".ljust(80, ".")
            store()
    else:
        load()
Beispiel #2
0
    print "loading emzed.updaters ".ljust(80, ".")
    print
    print "as this is the first time you start emzed, we recommend to run:"
    print
    registry = setup_updaters()
    for id_ in registry.updater_ids():
        print "   %s.run_%s()" % (__name__, id_)
    print
    print "".ljust(80, ".")


# is_started_from_cmdline() == True iff invoked via emzed.workbench command line command.
#
# in this case nothing should happen, because we want this actions
# later in spyders ipython console where is_started_from_cmdline() is False.
if _tools.runs_inside_emzed_console() and _tools.is_first_start():
    _print_first_start_info()


def print_update_status():
    from core.update_handling import registry
    print
    print
    for name, updater in registry.updaters.items():
        print "%-20s :" % name,
        flag, msg = updater.check_for_newer_version_on_exchange_folder()
        if flag is True:
            flag, msg = updater.fetch_update_from_exchange_folder()
            if flag is None:
                print "%s: no exchange folder configured" % name
            elif flag:
Beispiel #3
0
    print "loading emzed.updaters ".ljust(80, ".")
    print
    print "as this is the first time you start emzed, we recommend to run:"
    print
    registry = setup_updaters()
    for id_ in registry.updater_ids():
        print "   %s.run_%s()" % (__name__, id_)
    print
    print "".ljust(80, ".")


# is_started_from_cmdline() == True iff invoked via emzed.workbench command line command.
#
# in this case nothing should happen, because we want this actions
# later in spyders ipython console where is_started_from_cmdline() is False.
if _tools.runs_inside_emzed_console() and _tools.is_first_start():
    _print_first_start_info()


def print_update_status():
    from core.update_handling import registry
    print
    print
    for name, updater in registry.updaters.items():
        print "%-20s :" % name,
        flag, msg = updater.check_for_newer_version_on_exchange_folder()
        if flag is True:
            flag, msg = updater.fetch_update_from_exchange_folder()
            if flag is None:
                print "%s: no exchange folder configured" % name
            elif flag: