Did I find the right examples for you? yes no

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)

        def save_config(
    config, path=None):
    if not path:
        path = __config_file__
    #JSON is a better pickle:
    with open(path,"w") as f:
        f.write(json.dumps(config,sort_keys=True,indent=4))
    #Make the file read/write only to the user.
    os.chmod(path,00600)
        


src/m/u/musdex-11.07.04/musdex/commands.py   musdex(Download)
# VCS routines for musdex
#
# Copyright 2010 Max Battcher. Some rights reserved.
# Licensed for use under the Ms-RL. See attached LICENSE file.
from config import BASEDIR, load_index, save_index, save_config
        config['archives'].append(entry)
 
    save_config(args, config)
    save_index(config, index)
 
            if arc['filename'] != archive]
 
    save_config(args, config)
    save_index(config, index)
 

src/v/a/Vaporfile-HEAD/vaporfile/website.py   Vaporfile(Download)
        if not use_existing_bucket:
            print("Amazon S3 bucket created!")
        config.save_config(user_config)
        print("Website configuration saved!")
        website_endpoint = website.get_bucket().get_website_endpoint()
    else:
        del user_config["websites"][args.WEBSITE]
        config.save_config(user_config)
        print("")
        print("Local website configuration removed : {0}".format(args.WEBSITE))

src/v/a/Vaporfile-HEAD/vaporfile/credentials.py   Vaporfile(Download)
def store_credentials(credentials):
    """Store Amazon AWS credentials in user's home directory"""
    c = config.get_config()
    c["credentials"] = credentials
    config.save_config(c)
def remove_credentials(credentials):
    """Store Amazon AWS credentials in user's home directory"""
    c = config.get_config()
    del c["credentials"]
    config.save_config(c)

src/n/u/nupic-HEAD/external/linux32/lib/python2.6/site-packages/matplotlib/__init__.py   nupic(Download)
    #print "importing from reorganized config system!"
    try:
        from config import rcParams, rcdefaults, mplConfig, save_config
        verbose.set_level(rcParams['verbose.level'])
        verbose.set_fileo(rcParams['verbose.fileo'])