Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)

        def Initialise(data_dir, delete_file):
    global cfg, FILENAME, DATA_DIR

    DATA_DIR = data_dir

    home = extra.Get_Home()
    if home == None:
        FILENAME = "config.dat"
    else:
        FILENAME = os.path.join(home, ".lightyears.cfg")

    if delete_file:
        # Don't load old configuration
        Save()
        return

    try:
        f = file(FILENAME, "rb")
        cfg2 = pickle.load(f)
        f.close()
        if ( cfg2.version == CFG_VER ):
            # Configuration is valid, we can use it.
            cfg = cfg2
    except Exception, x:
        pass
        


src/2/0/20kly-HEAD/code/main.py   20kly(Download)
    print ""
 
    config.Initialise(data_dir, "--safe" in sys.argv)
    trig.Initialise()
    lp.Initialise()