Automatically reloads the config file.

        This is just an alias for self.load().
762863
def reload(self):
        

        if not self.fd.closed: self.fd.close()

        self.fd = open(self.fd.name, 'r')
        self.load()
647397
def do_reload(self, msg):
        
        #: TODO: This should use the autorelaoder
        app = self.app

        #: Show loading screen
        try:
            self.app.widget.showLoading("Reloading... Please wait.", now=True)
            #self.app.widget.restartPython(now=True)
            #sys.exit(0)
        except:
            #: TODO: Implement for iOS...
            pass
        self.save_changed_files(msg)

        if app.load_view is None:
            print("Warning: Reloading the view is not implemented. "
                  "Please set `app.load_view` to support this.")
            return
        if app.view is not None:
            try:
                app.view.destroy()
            except:
                pass

        def wrapped(f):
            def safe_reload(*args, **kwargs):
                try:
                    return f(*args, **kwargs)
                except:
                    #: Display the error
                    app.send_event(Command.ERROR, traceback.format_exc())
            return safe_reload

        app.deferred_call(wrapped(app.load_view), app)
908467
public final void reload(final CClassLoaderConfig config) {
		if (this == CClassLoader.getRootLoader()) {
			return;
		}

		if (config == null) {
			return;
		}

		final CClassLoader parent = ((CClassLoader) this.getParent());
		parent.removeLoader(this.name);

		if (this.isMandatory()) {
			CClassLoader.mandatoryLoadersMap.remove(this.getPath());
		}

		final CClassLoader newLoader = CClassLoader.getLoader(parent.getPath()
				+ "/" + this.name);
		newLoader.config = this.config;
		newLoader.booAlone = this.booAlone;
		newLoader.booMandatory = this.booMandatory;
		newLoader.booResourceOnly = this.booResourceOnly;
		newLoader.booDoNotForwardToParent = this.booDoNotForwardToParent;

		final List list = (List) config.getFilesMap().get(this.path);

		for (final Iterator f = list.iterator(); f.hasNext();) {
			final URL file = (URL) f.next();
			newLoader.readDirectories(file);
		}

		final Iterator it = this.childrenMap.keySet().iterator();

		while (it.hasNext()) {
			final CClassLoader child = (CClassLoader) this.childrenMap.get(it
					.next());
			child.reload();
		}

		this._destroy(null);

		if (newLoader.isMandatory()) {
			CClassLoader.mandatoryLoadersMap
					.put(newLoader.getPath(), newLoader);
		}

		newLoader.booInit = true;
	}
460235
def load(self, file=CONFIG_FILE):
        
        if not os.path.exists(file):
            print("Config file was not found under %s. Default file has been created" % CONFIG_FILE)
            self._settings = yaml.load(DEFAULT_CONFIG, yaml.RoundTripLoader)
            self.save(file)
            sys.exit()
        with open(file, 'r') as f:
            self._settings = yaml.load(f, yaml.RoundTripLoader)
874761
public function reload()
    {
        $this->container = $this->buildContainer($this->dir);

        // load input and output
        $this->container->set('input', $this->input);
        $this->container->set('output', $this->output);

        // freeze the container
        $this->container->compile();
    }
1013648
private final function loadConfig(): void
    {
        $this->config = new Config();

        $file = sprintf('%s/app/service/%s/config/config.php', APP_DIR, $this->name);
        if (file_exists($file) && is_array($data = include $file)) {
            $this->config->setData($data);
        }
    }
863036
def reload(self):
        
        r = self.api._req_directory(self.cid)
        self.pid = r['pid']
        self.name = r['name']
        self._count = r['count']
362951
def reload_settings(*args, **kwargs):
    
    global settings
    setting, value = kwargs['setting'], kwargs['value']
    if setting == XRAY_NAMESPACE:
        settings = XRaySettings(value)
888614
def reload(self):
        ''
        self.rows = []

#        if len(self.origCols) == 1 and self.origCols[0].type in (int, float, currency):
#            self.numericBinning()
#        else:
        self.discreteBinning()

        # automatically add cache to all columns now that everything is binned
        for c in self.nonKeyVisibleCols:
            c._cachedValues = collections.OrderedDict()
1118729
def load_config(cls):
        
        config_file = os.path.expanduser(cls.home_config)
        global_conf = cls.load(config_file, 'global')
        cls.load(cls.local_config, 'local')
        # update global configuration if needed
        cls.update_config(config_file, global_conf)
437467
public static void reload(String configFile) {
    	LogLog.debug("Will reload log4j based on config-file " + configFile);
        if (configFile != null) {
            if (configFile.endsWith(XML_FILE_EXENSION)) {
            	LogLog.debug("...using DOMConfigurator.configure()");
            	DOMConfigurator.configure(configFile);

            } else if (configFile.endsWith(".properties")) {
            	LogLog.debug("...using PropertyConfigurator.configure()");
                PropertyConfigurator.configure(configFile);

            }
            if (logger.isInfoEnabled()) {
                logger.info("Reloads log4j configuration: " + configFile);
            }
        }
    }
1277524
protected function loadConfig()
    {
        $this->hook->trigger(self::HOOK_LOAD_CONFIG_BEFORE);
        $this->config->load();
        $this->hook->trigger(self::HOOK_LOAD_CONFIG_AFTER);
    }
134042
def reload(self):
        """"""
        self.restarted_adapter = False
        self.data.clear()
        if conf.use_winpcapy:
            # Reload from Winpcapy
            from scapy.arch.pcapdnet import load_winpcapy
            load_winpcapy()
        self.load()
        # Reload conf.iface
        conf.iface = get_working_if()
735947
def reload(self, *modules):
        """"""
        self.notify('before_reload')

        if 'configfiles' in self.config:
            # reload configfiles
            self.log.info('Reloading configuration...')
            cfg = utils.parse_config(
                self.server and 'server' or 'bot', *self.config['configfiles'])
            self.config.update(cfg)

        self.log.info('Reloading python code...')
        if not modules:
            modules = self.registry.includes
        scanned = list(reversed(self.registry.scanned))

        # reset includes and events
        self.registry.reset()

        to_scan = []
        for module_name, categories in scanned:
            if module_name in modules:
                module = utils.maybedotted(module_name)
                reload_module(module)
            to_scan.append((module_name, categories))

        # rescan all modules
        for module_name, categories in to_scan:
            self.include(module_name, venusian_categories=categories)

        self.registry.reloading = {}

        self.notify('after_reload')
231103
public function reload(): void
    {
        $config = [];
        foreach($this->configSources as $src) {
            // If it's a string, then it's a file or directory path
            if (is_string($src)) {
                // If directory, get all config files within it, recursively
                if (is_dir($src)) {
                    $getConfigFiles = function(string $path) use (&$getConfigFiles) {
                        $fragments = [];
                        if (is_dir($path)) {
                            $d = dir($path);
                            while (($f = $d->read()) !== false) {
                                if ($f[0] === '.') {
                                    continue;
                                }
                                if (is_dir("$path/$f")) {
                                    $fragments = array_merge($fragments, $getConfigFiles("$path/$f"));
                                } else {
                                    $fragments[] = "$path/$f";
                                }
                            }
                        }
                        return $fragments;
                    };
                    $fragments = $getConfigFiles($src);
                    sort($fragments);
                    foreach($fragments as $c) {
                        $config = array_replace_recursive($config, $this->parseConfig(file_get_contents($c)));
                    }

                // If it's a file, just merge it's contents over the current config array
                } elseif (is_file($src)) {
                    $config = array_replace_recursive($config, $this->parseConfig(file_get_contents($src)));

                // If it doesn't exist in the filesystem, and it's not optional, throw an exception
                } elseif (array_search($src, $this->optional) === false) {
                    throw (new MissingConfigFileException("Required config file or directory `$src` is missing."))
                        ->setMissingPath($src);
                }

            // If the source is an array, just merge it in
            } elseif (is_array($src)) {
                $config = array_replace_recursive($config, $src);
            }
        }
        $this->config = $config;
    }
880530
public void reload() {
        // drops the classLoader and adds a new one
        this.classLoader = makeClassLoader();

        // Wire up invokers
        try {
            for (Entry<String, Wireable> entry : invokerLookups.entrySet()) {
                wire( classLoader, entry.getKey(), entry.getValue(), true );
            }
        } catch (final ClassNotFoundException e) {
            throw new RuntimeException( e );
        } catch (final InstantiationError e) {
            throw new RuntimeException( e );
        } catch (final IllegalAccessException e) {
            throw new RuntimeException( e );
        } catch (final InstantiationException e) {
            throw new RuntimeException( e );
        }

        this.dirty = false;
    }
318878
def _load(self, reload=False):
        
        if self.autoreload or reload:
            # First, we load from YAML, failing if syntax errors are found
            options = self.storage_options or {}
            if hasattr(self.path, 'path') or hasattr(self.path, 'read'):
                file_open = self.path
                self.path = make_path_posix(
                    getattr(self.path, 'path',
                            getattr(self.path, 'name', 'file')))
            else:
                file_open = open_files(self.path, mode='rb', **options)
                assert len(file_open) == 1
                file_open = file_open[0]
            self._dir = get_dir(self.path)

            with file_open as f:
                text = f.read().decode()
            if "!template " in text:
                logger.warning("Use of '!template' deprecated - fixing")
                text = text.replace('!template ', '')
            self.parse(text)