Did I find the right examples for you? yes no

All Samples(12)  |  Call(12)  |  Derive(0)  |  Import(0)
Save the config file if a location has been set with :func:`setConfig()`.

        def saveConfig():
    """
    Save the config file if a location has been set with :func:`setConfig()`.

    """

    global location, settings
    if location:
        try:
            with open(location, 'w') as cfg:
                import pickle
                pickle.dump(settings, cfg)
        except IOError:
            print "Couldn't save config...whoopsy"
        


src/r/e/reef-HEAD/reef/handler/sue_handler.py   reef(Download)
 
    print config.getSettings("SUE")
    config.saveConfig()
 
def ensureDir(dir):

src/r/e/reef-HEAD/reef/startup.py   reef(Download)
def finaliseConfig():
    """Save config and ask it to save on any normal exit."""
 
    config.saveConfig()
    print "Config written to disk"

src/r/e/reef-HEAD/reef/handler/actors.py   reef(Download)
            os.remove(config.getSettings("actors")["defs"][name]["file"])
        config.getSettings("actors")["defs"][name] = newActor
        config.saveConfig()
 
 

src/r/e/reef-HEAD/reef/handler/workloads.py   reef(Download)
        os.remove(config.getSettings("workloads")["defs"][name]["file"])
    config.getSettings("workloads")["defs"][name] = newWorkload
    config.saveConfig()
 
 

src/r/e/reef-HEAD/reef/handler/settings.py   reef(Download)
            except KeyError: pass
        # Make it permanent
        config.saveConfig()
        return request.response(settings)
 

src/r/e/reef-HEAD/reef/handler/actorassign.py   reef(Download)
            raise restlite.Status, "400 Invalid Action"            
 
        config.saveConfig()
 
        return request.response(workload)

src/m/c/mcedit-HEAD/mcedit.py   mcedit(Download)
            Settings.windowWidth.set(w)
            Settings.windowHeight.set(h)
            config.saveConfig()
 
        if pygame.version.vernum == (1, 9, 1):
            Settings.reportCrashesAsked.set(True)
 
        config.saveConfig()
        if "-causeError" in sys.argv:
            raise ValueError, "Error requested via -causeError"
                    Settings.windowShowCmd.set(showCmd)
 
                config.saveConfig()
                mcedit.editor.renderer.discardAllChunks()
                mcedit.editor.deleteAllCopiedSchematics()
        if sys.platform == 'win32' and Settings.setWindowPlacement.get():
            Settings.setWindowPlacement.set(False)
            config.saveConfig()
            X, Y = Settings.windowX.get(), Settings.windowY.get()
 
 
            Settings.setWindowPlacement.set(True)
            config.saveConfig()
 
        try:

src/m/c/mcedit-HEAD/leveleditor.py   mcedit(Download)
 
        Settings.viewDistance.set(self.renderer.viewDistance)
        config.saveConfig()