Exemple #1
0
def begin():
    global _initialized

    chips.lock()    
    chips.advanced.open_undo_buffer()
    if _initialized is False:
        try:
            overrides = config.items('chips')
            for item in overrides:
                chips.set_preference(item[0], item[1])
            chips.add_window() # Have Sherpa talk to its own
                               # chips window
        except NoSectionError:
            chips.unlock()
        except:
            chips.unlock()
            raise
        _initialized = True
Exemple #2
0
def begin():
    global _initialized

    chips.lock()    
    chips.advanced.open_undo_buffer()
    if _initialized is False:
        try:
            overrides = config.items('chips')
            for item in overrides:
                chips.set_preference(item[0], item[1])
            # OL: No apparent reason to call add_window() here.
            # ChIPS is smart enough to open a window if none are available,
            # plus this code only gets executed if the user has a [chips] section in sherpa.rc
            # which is the exception rather than the rule.
            # chips.add_window() # Have Sherpa talk to its own
                               # chips window
        except NoSectionError:
            chips.unlock()
        except:
            chips.unlock()
            raise
        _initialized = True
Exemple #3
0
def begin():
    global _initialized

    chips.lock()
    chips.advanced.open_undo_buffer()
    if _initialized is False:
        try:
            overrides = config.items('chips')
            for item in overrides:
                chips.set_preference(item[0], item[1])
            # OL: No apparent reason to call add_window() here.
            # ChIPS is smart enough to open a window if none are available,
            # plus this code only gets executed if the user has a [chips] section in sherpa.rc
            # which is the exception rather than the rule.
            # chips.add_window() # Have Sherpa talk to its own
            # chips window
        except NoSectionError:
            chips.unlock()
        except:
            chips.unlock()
            raise
        _initialized = True
Exemple #4
0
def exceptions():
    chips.advanced.discard_undo_buffer()
    chips.erase()
    chips.unlock()
Exemple #5
0
def end():
    # Don't need to call redraw here ourselves, the
    # ChIPS undo buffer does what we need.
    chips.advanced.close_undo_buffer()
    chips.unlock()
Exemple #6
0
def exceptions():
    chips.advanced.discard_undo_buffer()
    chips.erase()
    chips.unlock()
Exemple #7
0
def end():
    # Don't need to call redraw here ourselves, the
    # ChIPS undo buffer does what we need.
    chips.advanced.close_undo_buffer()
    chips.unlock()